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]
Date:	Mon, 26 Jan 2009 18:41:41 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mandeep Baines <msb@...gle.com>
Cc:	Frédéric Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH 2/2] add a counter for writers spinning on a rwlock

On Mon, 2009-01-26 at 09:36 -0800, Mandeep Baines wrote:

> Unfortunately, this can't be done for hung_task. It writes to the
> task_struct here:

Don't top post!

> static void check_hung_task(struct task_struct *t, unsigned long now,
>                             unsigned long timeout)
> {
>         unsigned long switch_count = t->nvcsw + t->nivcsw;
> 
>         if (t->flags & PF_FROZEN)
>                 return;
> 
>         if (switch_count != t->last_switch_count || !t->last_switch_timestamp) {
>                 t->last_switch_count = switch_count;
>                 t->last_switch_timestamp = now;
>                 return;
>         }
> 
> It is able to get away with using only a read_lock because no one else
> reads or writes to these fields.

How would RCU be different here?

--
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