Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4986583imm; Tue, 11 Sep 2018 22:49:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZo81VK+n6gShKFK91GDc8KIIBfovl/USdmAUmz9TCplKeg1dJjX/Wm0/VXms5Z61fri0Cs X-Received: by 2002:a17:902:ba83:: with SMTP id k3-v6mr228823pls.251.1536731350742; Tue, 11 Sep 2018 22:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536731350; cv=none; d=google.com; s=arc-20160816; b=QM2PVnAlsIilFKkATAnKxJLj9ecBlqlLOMVTxstvniBYx4IrPhzjm084AvmUa/itcm igkHu1CRLqO8GrBBHbv1zUtRD4aj5Xep+ssh108XR7TXLuvxNrYwXXBGtNV0zlAzCdq7 xlxFuVQ/q1FneGPDCmpdskjbxC/iVFv4X1cQncHWpA7jQcjrt+imBMe1WCro5D36agwC Lx3P2Kq42ugadxQWUzQYqxEojeky/BGnAU8YlJTMGPIF1xoVLusAvLKRCANFLUvRZa9R ddmxYcpDH4ilGimFLrSMJw+bxe2yHCmq1OZLJognvzjYRS+H2ul05aLSrLBF6h5lZUuE xp3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=DUC52jmXOo/la54B8L8KiWDI6l30RSSu4mpnLr5NLwo=; b=ux0QNjh7JQ7pyqWjZgmLfkDOIxNytpJF0LRiRv/xAILUHwxWBDqWpa2werVNFV8Gln 269wuAA+WNQWTsnzWfJDvYc/A9uHJloX6BU/qy8rlkRwtY2ISxgHTYTAgn5SOusp43qC e+AJ5IfhjEXjR9Xtn1z6hG9S+A37stCOPl7SNLeDbaMjO7Ktob961Uoc2J7gy5Jn+IaX 0lp9edqDMsjyva8D7INgnA+z4/JzBLIdOBwybymzcRFmZsgQVlIs5ADVXu4UyBdFKI0A BzOApCXSnJLwzI54J0lqk7pCLxqlu8Klg8zi18L9tEucL8OGtJg9kyzxjZgDwSbLfvEB P7Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=XfyJQlTG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si41717pgg.67.2018.09.11.22.48.46; Tue, 11 Sep 2018 22:49:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=XfyJQlTG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbeILKve (ORCPT + 99 others); Wed, 12 Sep 2018 06:51:34 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:37187 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725740AbeILKve (ORCPT ); Wed, 12 Sep 2018 06:51:34 -0400 Received: by mail-oi0-f68.google.com with SMTP id p84-v6so1382112oic.4 for ; Tue, 11 Sep 2018 22:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DUC52jmXOo/la54B8L8KiWDI6l30RSSu4mpnLr5NLwo=; b=XfyJQlTGdmzreNTMQ590wRDVzKXJxMiOQXHIScdJB9tcaPJqWA+XhcMgWkhX7NQz6D LIuOm0BcFRlK1gH3bcX3J/c35dxA55XVjU8FaPyW5Zt21ijjQhiJrgXae3f+YMw3ysPw gyjTpz2q6TY2DkrhzO+Tt+xJFvw31rOJr76Kg44CYyLZ39x6rKomghlg2Gm6oi0D5OuY ZffNEwIpIxDBgraxJW/YPyNZADSCACtAB9VihWNvDnj0rQiEAj0ymbvQBFMNyCnY/avR /4giw8aB4SFBzeWMP4vbhlVaUwMCYbRKw9gFYzE73+DZJhFLjBpHcWO9jhlez3wXid+T HYCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DUC52jmXOo/la54B8L8KiWDI6l30RSSu4mpnLr5NLwo=; b=t2QW6R37eTU33YD3YnNPEYrK82L6SazhsZfZKVMb51Jx7TRJ5qFmiZvdXqV2LXs3fy rdJd99/g48vb9jWyifX4YyofPSfKZYH3Bt9U4Myy2FNewi370JCba2ZGTVaxqjaFwH67 9njdh9J+5Kk0DDErlWTJc5ho7PwytlDfp83S39thsXYJbmMc6iaqeBD7kmzaDEtfG9iq FzDYclV0iwxHh+srZJLFfZdc6KJFWaHvmtHyyXpEo4rMm0ckhRZvx/NGUj3zuPOgmkj1 9QxFJnW4galBmRsuTedv3tq5nnOTpOeeYlw/KimrdaQfPAu00ydc95EC1d+wfAwk1IlG F2og== X-Gm-Message-State: APzg51CPgg315ycI1vBn/FCrfKk5+CYWhpXJYDcM2yzsnA8oIczUejPB RMvd7csDqmIaZbzIQUyM6r3upUsg0GbDuH/jeE62Hg== X-Received: by 2002:aca:ed57:: with SMTP id l84-v6mr295506oih.62.1536731321366; Tue, 11 Sep 2018 22:48:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:8e85:0:0:0:0:0 with HTTP; Tue, 11 Sep 2018 22:48:40 -0700 (PDT) In-Reply-To: <20180910234400.4068.15541.stgit@localhost.localdomain> References: <20180910232615.4068.29155.stgit@localhost.localdomain> <20180910234400.4068.15541.stgit@localhost.localdomain> From: Dan Williams Date: Tue, 11 Sep 2018 22:48:40 -0700 Message-ID: Subject: Re: [PATCH 4/4] nvdimm: Trigger the device probe on a cpu local to the device To: Alexander Duyck Cc: Linux MM , Linux Kernel Mailing List , linux-nvdimm , pavel.tatashin@microsoft.com, Michal Hocko , Dave Jiang , Ingo Molnar , Dave Hansen , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Andrew Morton , Logan Gunthorpe , "Kirill A. Shutemov" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 4:44 PM, Alexander Duyck wrote: > From: Alexander Duyck > > This patch is based off of the pci_call_probe function used to initialize > PCI devices. The general idea here is to move the probe call to a location > that is local to the memory being initialized. By doing this we can shave > significant time off of the total time needed for initialization. > > With this patch applied I see a significant reduction in overall init time > as without it the init varied between 23 and 37 seconds to initialize a 3GB > node. With this patch applied the variance is only between 23 and 26 > seconds to initialize each node. > > I hope to refine this further in the future by combining this logic into > the async_schedule_domain code that is already in use. By doing that it > would likely make this functionality redundant. Yeah, it is a bit sad that we schedule an async thread only to move it back somewhere else. Could we trivially achieve the same with an async_schedule_domain_on_cpu() variant? It seems we can and the workqueue core will "Do the right thing". I now notice that async uses the system_unbound_wq and work_on_cpu() uses the system_wq. I don't think we want long running nvdimm work on system_wq.