All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: David Hildenbrand <david@redhat.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Michal Hocko <mhocko@suse.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Paul Mackerras <paulus@samba.org>,
	linux-s390@vger.kernel.org, sthemmin@microsoft.com,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	David Rientjes <rientjes@google.com>,
	xen-devel@lists.xenproject.org, Len Brown <lenb@kernel.org>,
	haiyangz@microsoft.com, Dan Williams <dan.j.williams@intel.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	osalvador@suse.de, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Martin
Subject: Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug
Date: Fri, 17 Aug 2018 19:02:39 +0200	[thread overview]
Message-ID: <20180817170239.GF24945@kroah.com> (raw)
In-Reply-To: <ecc08303-96ee-76ad-fba4-0425413afa5a@redhat.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: David Hildenbrand <david@redhat.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Michal Hocko <mhocko@suse.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Paul Mackerras <paulus@samba.org>,
	linux-s390@vger.kernel.org, sthemmin@microsoft.com,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	David Rientjes <rientjes@google.com>,
	xen-devel@lists.xenproject.org, Len Brown <lenb@kernel.org>,
	haiyangz@microsoft.com, Dan Williams <dan.j.williams@intel.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	osalvador@suse.de, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	devel@linuxdriverproject.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug
Date: Fri, 17 Aug 2018 19:02:39 +0200	[thread overview]
Message-ID: <20180817170239.GF24945@kroah.com> (raw)
In-Reply-To: <ecc08303-96ee-76ad-fba4-0425413afa5a@redhat.com>

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

  reply	other threads:[~2018-08-17 17:02 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17  7:58 [PATCH RFC 0/2] mm: online/offline_pages called w.o. mem_hotplug_lock David Hildenbrand
2018-08-17  7:58 ` David Hildenbrand
2018-08-17  7:59 ` [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug David Hildenbrand
2018-08-17  7:59   ` David Hildenbrand
2018-08-17  8:41   ` Greg Kroah-Hartman
2018-08-17  8:41     ` Greg Kroah-Hartman
2018-08-17  8:56     ` David Hildenbrand
2018-08-17  8:56       ` David Hildenbrand
2018-08-17  9:03       ` Rafael J. Wysocki
2018-08-17  9:03         ` Rafael J. Wysocki
2018-08-17  9:41         ` David Hildenbrand
2018-08-17  9:41           ` David Hildenbrand
2018-08-17 10:06           ` Greg Kroah-Hartman
2018-08-17 10:06             ` Greg Kroah-Hartman
2018-08-17 11:04             ` David Hildenbrand
2018-08-17 11:04               ` David Hildenbrand
2018-08-17 11:28               ` Heiko Carstens
2018-08-17 11:28                 ` Heiko Carstens
2018-08-17 11:56                 ` David Hildenbrand
2018-08-17 11:56                 ` David Hildenbrand
2018-08-17 11:56                   ` David Hildenbrand
2018-08-17 17:02                   ` Greg Kroah-Hartman [this message]
2018-08-17 17:02                     ` Greg Kroah-Hartman
2018-08-17 17:02                   ` Greg Kroah-Hartman
2018-08-17 11:28               ` Heiko Carstens
2018-08-17 11:04             ` David Hildenbrand
2018-08-17 10:06           ` Greg Kroah-Hartman
2018-08-17  9:41         ` David Hildenbrand
2018-08-17  9:03       ` Rafael J. Wysocki
2018-08-17  8:56     ` David Hildenbrand
2018-08-17  8:57     ` Rafael J. Wysocki
2018-08-17  8:57     ` Rafael J. Wysocki
2018-08-17  8:57       ` Rafael J. Wysocki
2018-08-17  8:41   ` Greg Kroah-Hartman
2018-08-17  7:59 ` David Hildenbrand
2018-08-17  7:59 ` [PATCH RFC 2/2] mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock David Hildenbrand
2018-08-17  7:59   ` David Hildenbrand
2018-08-17  8:20   ` Rafael J. Wysocki
2018-08-17  8:20     ` Rafael J. Wysocki
2018-08-17  8:27     ` David Hildenbrand
2018-08-17  8:27       ` David Hildenbrand
2018-08-17  8:27     ` David Hildenbrand
2018-08-17  8:20   ` Rafael J. Wysocki
2018-08-17  7:59 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180817170239.GF24945@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=haiyangz@microsoft.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@oracle.com \
    --cc=paulus@samba.org \
    --cc=rafael@kernel.org \
    --cc=rientjes@google.com \
    --cc=rjw@rjwysocki.net \
    --cc=sthemmin@microsoft.com \
    --cc=vbabka@suse.cz \
    --cc=vkuznets@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.