Re: [driver-core PATCH v5 7/9] driver core: Attach devices on CPU local to device node

From: Bart Van Assche
Date: Tue Nov 06 2018 - 19:24:19 EST


On Mon, 2018-11-05 at 13:12 -0800, Alexander Duyck wrote:
+AD4 This change makes it so that we call the asynchronous probe routines on a
+AD4 CPU local to the device node. By doing this we should be able to improve
+AD4 our initialization time significantly as we can avoid having to access the
+AD4 device from a remote node which may introduce higher latency.
+AD4
+AD4 For example, in the case of initializing memory for NVDIMM this can have a
+AD4 significant impact as initialing 3TB on remote node can take up to 39
+AD4 seconds while initialing it on a local node only takes 23 seconds. It is
+AD4 situations like this where we will see the biggest improvement.
+AD4
+AD4 Signed-off-by: Alexander Duyck +ADw-alexander.h.duyck+AEA-linux.intel.com+AD4
+AD4 ---
+AD4 drivers/base/dd.c +AHw 4 +-+---
+AD4 1 file changed, 2 insertions(+-), 2 deletions(-)
+AD4
+AD4 diff --git a/drivers/base/dd.c b/drivers/base/dd.c
+AD4 index 2fdfe45bb6ea..cf7681309ee3 100644
+AD4 --- a/drivers/base/dd.c
+AD4 +-+-+- b/drivers/base/dd.c
+AD4 +AEAAQA -834,7 +-834,7 +AEAAQA static int +AF8AXw-device+AF8-attach(struct device +ACo-dev, bool allow+AF8-async)
+AD4 dev+AF8-dbg(dev, +ACI-scheduling asynchronous probe+AFw-n+ACI)+ADs
+AD4 get+AF8-device(dev)+ADs
+AD4 dev-+AD4-async+AF8-probe +AD0 true+ADs
+AD4 - async+AF8-schedule(+AF8AXw-device+AF8-attach+AF8-async+AF8-helper, dev)+ADs
+AD4 +- async+AF8-schedule+AF8-dev(+AF8AXw-device+AF8-attach+AF8-async+AF8-helper, dev)+ADs
+AD4 +AH0 else +AHs
+AD4 pm+AF8-request+AF8-idle(dev)+ADs
+AD4 +AH0
+AD4 +AEAAQA -992,7 +-992,7 +AEAAQA static int +AF8AXw-driver+AF8-attach(struct device +ACo-dev, void +ACo-data)
+AD4 if (+ACE-dev-+AD4-driver) +AHs
+AD4 get+AF8-device(dev)+ADs
+AD4 dev+AF8-set+AF8-drv+AF8-async(dev, drv)+ADs
+AD4 - async+AF8-schedule(+AF8AXw-driver+AF8-attach+AF8-async+AF8-helper, dev)+ADs
+AD4 +- async+AF8-schedule+AF8-dev(+AF8AXw-driver+AF8-attach+AF8-async+AF8-helper, dev)+ADs
+AD4 +AH0
+AD4 device+AF8-unlock(dev)+ADs
+AD4 return 0+ADs

Reviewed-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4