[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdecb526-9f61-bdb9-85f1-a6243b5fac7a@i-love.sakura.ne.jp>
Date: Tue, 10 Jul 2018 19:48:31 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Peter Zijlstra <peterz@...radead.org>
Cc: kbuild test robot <lkp@...el.com>, kbuild-all@...org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH] locking/lockdep: Dump state of percpu_rwsem upon hung up.
On 2018/07/10 18:30, Peter Zijlstra wrote:
>> diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h
>> index e475683..1164965 100644
>> --- a/include/linux/rwsem-spinlock.h
>> +++ b/include/linux/rwsem-spinlock.h
>> @@ -22,7 +22,7 @@
>> * - if wait_list is not empty, then there are processes waiting for the semaphore
>> */
>> struct rw_semaphore {
>> - __s32 count;
>> + atomic_long_t count;
>
> Uhhh... how does this even build? rwsem-spinlock.c doesn't use
> atomic_long primitives to change count.
Sorry, I forgot to build test rwsem-spinlock.c side.
>
> And the atomic_long count usage is completely private to rwsem-xadd.c,
> nothing outside of that should use that field, ever.
>
The reason I made above patch is to make
"[PATCH] locking/lockdep: Dump state of percpu_rwsem upon hung up." patch
possible to build on x86_64. Although "nothing outside of that should use
that field", I want to check "struct rw_semaphore"->count for isolating
the problem.
Should I update
"[PATCH] locking/lockdep: Dump state of percpu_rwsem upon hung up." side
to use "#ifndef CONFIG_RWSEM_GENERIC_SPINLOCK" ?
Powered by blists - more mailing lists