Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp764303imm; Fri, 21 Sep 2018 07:57:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaWFFJ8f/nIO5NFi1VW8Hbc5qqjWqAeCGR+Y/sw5mbyb12eY126ku5j6pNaeRYot/TPgqnK X-Received: by 2002:a63:7107:: with SMTP id m7-v6mr41427775pgc.73.1537541832908; Fri, 21 Sep 2018 07:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537541832; cv=none; d=google.com; s=arc-20160816; b=Ii7l4r3yQpbTodezGibUSTIgPZyyXB5yTZesamtNbKe/4Gxrg4ueFAHCXiGmPMwZuu XpXQuml7de+3urm9q69Q1hVwTuqhqg8c5WgkeSAPbOPhxh5h84evxr3UUnk68/IPG01R xx//9+ExvyZ2lhYSOCuKI+brWahXcnuly3n8C8AuLFFEByID2AJjAdsQrWT/lzNB17tM RIVYgzOpqeGvi4BQMuudGgnr6oMxFSptbkZZgTTHth6JwDojiQ6VQshPcM+Wf4XB8qFQ CdBwzVQLqbkiR1FrAYZRHBDcj0ue2Oocd0Y/MoW65RaPdS8At2ym2vKnKAYu/vyiTd2i avxg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=AVfjyqOJ0d+twOaPAVBfnS76qDdlaAnz37+1o5vyifM=; b=VpzBqa1hs+6wjhuGm86NGG77xv2qzdy4tskmDhKQTUu7t8ZHwe35KojKH6nvYqLkB9 a2ZkkiZdbKSJLM2fnCaPHIl95BVnAUEHCw03UrGQYsgQhzbnDMTLq0C3QF+uINid6NLZ A84d4c+ui3NPRiY41Cdvd9y0XTcRZxYtICOaUEQZg4VOzPLF164k3F/hYmbUzIcFZGvI DV2Epea9whLYL2x6puIXkNtpAPRK0c7v9vNOw+S2JACKrT5+CPalGuI4JFGNGnRR93U5 sLDFHh7FKogiggtBD5gqEX9NmTt/YQin+tb1T62qdGynX+UPZU60FOJE+eahmd3jFyPR dWZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=EfSLbIJz; 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 n62-v6si4639798pga.609.2018.09.21.07.56.55; Fri, 21 Sep 2018 07:57:12 -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=EfSLbIJz; 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 S2390212AbeIUUpr (ORCPT + 99 others); Fri, 21 Sep 2018 16:45:47 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:32889 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbeIUUpq (ORCPT ); Fri, 21 Sep 2018 16:45:46 -0400 Received: by mail-oi0-f67.google.com with SMTP id 8-v6so11663895oip.0 for ; Fri, 21 Sep 2018 07:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AVfjyqOJ0d+twOaPAVBfnS76qDdlaAnz37+1o5vyifM=; b=EfSLbIJz8TfdiPRIUHj5HghqftRXU23MDYF0q3ebyXVJKxyGuNX3O+UlQ2+KyFX0Pm DUEHSlZYlfHVOqpZ02FScOeU31dj6W6wh00Oa6BW6RpyHGInbsTY12uSpuo3XDtXxlGF w7+TpXU95GUFnlDdHEw4GeG8cSezcW41HLHp92VUo7n/9FkvQwZyaXczKCSjdSMVlgaH 1ZgwNlSmSYk0Url9TipJb2LQLqnZqu0qrSLNuOuybhl+K900EOODMuvDXYTAn/ukFfZG XMWzM/SUnJEwa/cOdFzH6ZV74Ng+J/xJ7Lfo4pQDIIUoPk2NUosJuMNCxwuZe7lbt19z MUiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AVfjyqOJ0d+twOaPAVBfnS76qDdlaAnz37+1o5vyifM=; b=gB2v3jSxV4PTQeIa0wXLizfbmIOUiHlpEs8PlxvHPDlAbgmJfYaNrvBOLCR8IG4SBa HlRtfyGR4gmU8e7sMpE1DSrbhnebohoebcxXa8Qh7DbeEO9uUOf4w1gaUBxPm3j/XY8H H5WNhtzWUG4FIuvtKoBUsRt71NzbFl8ZBV0HYgUPKgBT9I/Ra0DBMi3oQIAEC+jd84C+ C5j9G33wLrpQUWxs1j4yrgANjXLB06AzGXC69cTOLYXvrpAOllg5GLnQZlCUPA/Q0+oD pwgV9OVavIsj0LMekihT4+LIh5vtH1z0EMiSU3GTe9IRA8PUJN8mO4NjKfVJnWSThRgy TBoQ== X-Gm-Message-State: APzg51CHqwODQEqTvfsceMWRH9H7/5stzac7frce5GHzZO61JDIAsWTy cCFih5aXU09aG8AVHYdy/UkZsnt6SpeTDmX1oD9hbQ== X-Received: by 2002:aca:b355:: with SMTP id c82-v6mr1940983oif.9.1537541792186; Fri, 21 Sep 2018 07:56:32 -0700 (PDT) MIME-Version: 1.0 References: <20180920215824.19464.8884.stgit@localhost.localdomain> <20180920222951.19464.39241.stgit@localhost.localdomain> <0d6525c1-2e8b-0e5d-7dae-193bf697a4ec@linux.intel.com> <6e17294f-4847-9e7a-2396-6fffaf8a8f4a@linux.intel.com> In-Reply-To: <6e17294f-4847-9e7a-2396-6fffaf8a8f4a@linux.intel.com> From: Dan Williams Date: Fri, 21 Sep 2018 07:56:20 -0700 Message-ID: Subject: Re: [PATCH v4 5/5] nvdimm: Schedule device registration on node local to the device To: alexander.h.duyck@linux.intel.com Cc: Linux MM , Linux Kernel Mailing List , linux-nvdimm , Pasha Tatashin , 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 Fri, Sep 21, 2018 at 7:48 AM Alexander Duyck wrote: [..] > > I was thinking everywhere we set dev->parent before registering, also > > set the node... > > That will not work unless we move the call to device_initialize to > somewhere before you are setting the node. That is why I was thinking it > might work to put the node assignment in nd_device_register itself since > it looks like the regions don't call __nd_device_register directly. > > I guess we could get rid of nd_device_register if we wanted to go that > route. > > >> If you wanted what I could do is pull the set_dev_node call from > >> nvdimm_bus_uevent and place it in nd_device_register. That should stick > >> as the node doesn't get overwritten by the parent if it is set after > >> device_initialize. If I did that along with the parent bit I was already > >> doing then all that would be left to do in is just use the dev_to_node > >> call on the device itself. > > > > ...but this is even better. > > > > I'm not sure it adds that much. Basically My thought was we just need to > make sure to set the device node after the call to device_initialize but > before the call to device_add. This just seems like a bunch more work > spread the device_initialize calls all over and introduce possible > regressions. Yeah, device_initialize() clobbering the numa_node makes it awkward. Lets go with what you have presently and fix up the comment to say why region devices are special.