Re: [RFC] seqlock,lockdep: Add lock primitives to read_seqbegin().

Steven Rostedt
2011-03-29T12:49:06Z

On Tue, 2011-03-29 at 13:30 +0900, Tetsuo Handa wrote:
> I made a small test module (which should work on 2.6.38.2).

Thanks! I'll take a look at this later today.
>
> ---------- locktest.c start ----------
[...]
> ---------- Makefile end ----------
>
> Below are my testcases and results (gcc 3.3 / x86_32).
> Kernel config is at http://I-love.SAKURA.ne.jp/tmp/config-2.6.38.2 .
>
> ---------- Testcase 1 ----------
>
> # cat /proc/locktest1
> # cat /proc/locktest2
> # cat /proc/locktest1
> # cat /proc/locktest2
> # cat /proc/locktest1
> # cat /proc/locktest2
>
> showed nothing in dmesg.
>
> ---------- Testcase 2 ----------
>
> # cat /proc/locktest1
> # cat /proc/locktest2
> # cat /proc/locktest3
>
> showed below message.
>
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.38.2 #1
> -------------------------------------------------------

[...]

> Well... did I misuse spinlock primitives in read_seqbegin2()?
> Anyway, lockdep should catch testcase 1.

Strange. I'll investigate this further.

Thanks,

-- Steve