lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830806261417u3015a9b2i6318841de866d768@mail.gmail.com>
Date:	Thu, 26 Jun 2008 14:17:35 -0700
From:	"Paul Menage" <menage@...gle.com>
To:	"Max Krasnyansky" <maxk@...lcomm.com>
Cc:	"Vegard Nossum" <vegard.nossum@...il.com>,
	"Paul Jackson" <pj@....com>, a.p.zijlstra@...llo.nl,
	linux-kernel@...r.kernel.org, "Gautham shenoy" <ego@...ibm.com>
Subject: Re: [RFC][PATCH] CPUSets: Move most calls to rebuild_sched_domains() to the workqueue

On Thu, Jun 26, 2008 at 1:34 PM, Paul Menage <menage@...gle.com> wrote:
>
> void get_online_cpus(void)
> {
>        might_sleep();
>        if (cpu_hotplug.active_writer == current)
>                return;
>        down_read(&cpu_hotplug.lock);
> }
>
> void put_online_cpus(void)
> {
>        if (cpu_hotplug.active_writer == current)
>                return;
>        up_read(&cpu_hotplug.lock);
> }
>
> static void cpu_hotplug_begin(void)
> {
>        down_write(&cpu_hotplug.lock);
>        cpu_hotplug.active_writer = current;
> }
>
> static void cpu_hotplug_done(void)
> {
>        cpu_hotplug.active_writer = NULL;
>        up_write(&cpu_hotplug.lock);
> }
>
> I think that combined with moving the async rebuild_sched_domains to a
> separate thread should solve the problem, but I'm wondering why
> cpu_hotplug.lock was implemented this way in the first place.

Oh, I guess that doesn't work because of recursive calls to
get_online_cpus(). Maybe we need a down_read_recursive() that skips
ahead of waiting writers if the lock is already held in read mode?

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ