From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Tang Chen <tangchen@cn.fujitsu.com>,
Vlastimil Babka <vbabka@suse.cz>,
David Rientjes <rientjes@google.com>,
Fabian Frederick <fabf@skynet.be>,
Zhang Zhen <zhenzhang.zhang@huawei.com>,
Vladimir Davydov <vdavydov@parallels.com>,
Wang Nan <wangnan0@huawei.com>,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
linux-mm@kvack.org
Subject: Re: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug
Date: Thu, 12 Feb 2015 11:16:31 +0100 [thread overview]
Message-ID: <87wq3nzb7k.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <2420637.jF050I0e1M@vostro.rjw.lan> (Rafael J. Wysocki's message of "Thu, 12 Feb 2015 05:04:28 +0100")
"Rafael J. Wysocki" <rjw@rjwysocki.net> writes:
> On Wednesday, February 11, 2015 12:39:47 PM Andrew Morton wrote:
>> On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>>
>> > add_memory() is supposed to be run with device_hotplug_lock grabbed, otherwise
>> > it can race with e.g. device_online(). Allow external modules (hv_balloon for
>> > now) to lock device hotplug.
>> >
>> > ...
>> >
>> > --- a/drivers/base/core.c
>> > +++ b/drivers/base/core.c
>> > @@ -55,11 +55,13 @@ void lock_device_hotplug(void)
>> > {
>> > mutex_lock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(lock_device_hotplug);
>> >
>> > void unlock_device_hotplug(void)
>> > {
>> > mutex_unlock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(unlock_device_hotplug);
>> >
>> > int lock_device_hotplug_sysfs(void)
>> > {
>>
>> It's kinda crazy that lock_device_hotplug_sysfs() didn't get any
>> documentation. I suggest adding this while you're in there:
>>
>>
>> --- a/drivers/base/core.c~a
>> +++ a/drivers/base/core.c
>> @@ -61,6 +61,9 @@ void unlock_device_hotplug(void)
>> mutex_unlock(&device_hotplug_lock);
>> }
>>
>> +/*
>> + * "git show 5e33bc4165f3ed" for details
>> + */
>> int lock_device_hotplug_sysfs(void)
>> {
>> if (mutex_trylock(&device_hotplug_lock))
>>
>> which is a bit lazy but whatev.
>>
>> I'll assume that Greg (or Rafael?) will be processing this patchset.
>
> Well, I would do that if I saw it (my address in the CC has been deprecated
> for several months now).
>
> Vitaly, can you please resend with a CC to a valid address of mine,
> please?
Yes, sure, for some reason you were not on the get_maintainer.pl output.
>
> Rafael
--
Vitaly
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Tang Chen <tangchen@cn.fujitsu.com>,
Vlastimil Babka <vbabka@suse.cz>,
David Rientjes <rientjes@google.com>,
Fabian Frederick <fabf@skynet.be>,
Zhang Zhen <zhenzhang.zhang@huawei.com>,
Vladimir Davydov <vdavydov@parallels.com>,
Wang Nan <wangnan0@huawei.com>,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
linux-mm@kvack.org
Subject: Re: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug
Date: Thu, 12 Feb 2015 11:16:31 +0100 [thread overview]
Message-ID: <87wq3nzb7k.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <2420637.jF050I0e1M@vostro.rjw.lan> (Rafael J. Wysocki's message of "Thu, 12 Feb 2015 05:04:28 +0100")
"Rafael J. Wysocki" <rjw@rjwysocki.net> writes:
> On Wednesday, February 11, 2015 12:39:47 PM Andrew Morton wrote:
>> On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>>
>> > add_memory() is supposed to be run with device_hotplug_lock grabbed, otherwise
>> > it can race with e.g. device_online(). Allow external modules (hv_balloon for
>> > now) to lock device hotplug.
>> >
>> > ...
>> >
>> > --- a/drivers/base/core.c
>> > +++ b/drivers/base/core.c
>> > @@ -55,11 +55,13 @@ void lock_device_hotplug(void)
>> > {
>> > mutex_lock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(lock_device_hotplug);
>> >
>> > void unlock_device_hotplug(void)
>> > {
>> > mutex_unlock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(unlock_device_hotplug);
>> >
>> > int lock_device_hotplug_sysfs(void)
>> > {
>>
>> It's kinda crazy that lock_device_hotplug_sysfs() didn't get any
>> documentation. I suggest adding this while you're in there:
>>
>>
>> --- a/drivers/base/core.c~a
>> +++ a/drivers/base/core.c
>> @@ -61,6 +61,9 @@ void unlock_device_hotplug(void)
>> mutex_unlock(&device_hotplug_lock);
>> }
>>
>> +/*
>> + * "git show 5e33bc4165f3ed" for details
>> + */
>> int lock_device_hotplug_sysfs(void)
>> {
>> if (mutex_trylock(&device_hotplug_lock))
>>
>> which is a bit lazy but whatev.
>>
>> I'll assume that Greg (or Rafael?) will be processing this patchset.
>
> Well, I would do that if I saw it (my address in the CC has been deprecated
> for several months now).
>
> Vitaly, can you please resend with a CC to a valid address of mine,
> please?
Yes, sure, for some reason you were not on the get_maintainer.pl output.
>
> Rafael
--
Vitaly
next prev parent reply other threads:[~2015-02-12 10:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 15:44 [PATCH 0/3] memory_hotplug: hyperv: fix deadlock between memory adding and onlining Vitaly Kuznetsov
2015-02-11 15:44 ` Vitaly Kuznetsov
2015-02-11 15:44 ` [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug Vitaly Kuznetsov
2015-02-11 15:44 ` Vitaly Kuznetsov
2015-02-11 20:39 ` Andrew Morton
2015-02-11 20:39 ` Andrew Morton
2015-02-12 4:04 ` Rafael J. Wysocki
2015-02-12 4:04 ` Rafael J. Wysocki
2015-02-12 10:16 ` Vitaly Kuznetsov [this message]
2015-02-12 10:16 ` Vitaly Kuznetsov
2015-02-11 15:44 ` [PATCH 2/3] memory_hotplug: add note about holding device_hotplug_lock and add_memory() Vitaly Kuznetsov
2015-02-11 15:44 ` Vitaly Kuznetsov
2015-02-11 15:44 ` [PATCH 3/3] Drivers: hv: balloon: fix deadlock between memory adding and onlining Vitaly Kuznetsov
2015-02-11 15:44 ` Vitaly Kuznetsov
2015-02-11 20:30 ` [PATCH 0/3] memory_hotplug: hyperv: " David Rientjes
2015-02-11 20:30 ` David Rientjes
2015-02-12 6:39 ` David Rientjes
2015-02-12 6:39 ` David Rientjes
2015-02-12 15:39 ` Vitaly Kuznetsov
2015-02-12 15:39 ` Vitaly Kuznetsov
2015-02-12 10:15 ` Vitaly Kuznetsov
2015-02-12 10:15 ` Vitaly Kuznetsov
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=87wq3nzb7k.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=devel@linuxdriverproject.org \
--cc=fabf@skynet.be \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=rjw@rjwysocki.net \
--cc=tangchen@cn.fujitsu.com \
--cc=vbabka@suse.cz \
--cc=vdavydov@parallels.com \
--cc=wangnan0@huawei.com \
--cc=zhenzhang.zhang@huawei.com \
/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.