From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id CCF0D6B093D for ; Fri, 17 Aug 2018 13:02:44 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id 2-v6so5141977plc.11 for ; Fri, 17 Aug 2018 10:02:44 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id y8-v6si2637193plr.136.2018.08.17.10.02.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 10:02:43 -0700 (PDT) Date: Fri, 17 Aug 2018 19:02:39 +0200 From: Greg Kroah-Hartman Subject: Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug Message-ID: <20180817170239.GF24945@kroah.com> References: <20180817075901.4608-1-david@redhat.com> <20180817075901.4608-2-david@redhat.com> <20180817084146.GB14725@kroah.com> <5a5d73e9-e4aa-ffed-a2e3-8aef64e61923@redhat.com> <42df9062-f647-3ad6-5a07-be2b99531119@redhat.com> <20180817100604.GA18164@kroah.com> <4ac624be-d2d6-5975-821f-b20a475781dc@redhat.com> <20180817112850.GB3565@osiris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: David Hildenbrand Cc: Heiko Carstens , Michal Hocko , "Rafael J. Wysocki" , Benjamin Herrenschmidt , Linux Memory Management List , Paul Mackerras , linux-s390@vger.kernel.org, sthemmin@microsoft.com, Pavel Tatashin , ACPI Devel Maling List , David Rientjes , xen-devel@lists.xenproject.org, Len Brown , haiyangz@microsoft.com, Dan Williams , Vitaly Kuznetsov , Vlastimil Babka , osalvador@suse.de, "Rafael J. Wysocki" , Linux Kernel Mailing List , Martin Schwidefsky , devel@linuxdriverproject.org, Andrew Morton , linuxppc-dev On Fri, Aug 17, 2018 at 01:56:35PM +0200, David Hildenbrand wrote: > E.g. When adding the memory block devices, we know that there won't be a > driver to attach to (as there are no drivers for the "memory" subsystem) > - the bus_probe_device() function that takes the device_lock() could > pretty much be avoided for that case. But burying such special cases > down in core driver code definitely won't make locking related to memory > hotplug easier. You don't have to have a driver for a device if you don't want to, or you can just have a default one for all memory devices if you somehow need it. No reason to not do this if it makes things easier for you. thanks, greg k-h