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: <8e7d19ea-f2e6-f441-6ab9-cbff6d96589c@redhat.com>
Date:   Tue, 4 Jun 2019 13:30:00 -0400
From:   Waiman Long <longman@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will.deacon@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
        x86@...nel.org, Davidlohr Bueso <dave@...olabs.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        huang ying <huang.ying.caritas@...il.com>
Subject: Re: [PATCH v8 15/19] locking/rwsem: Adaptive disabling of reader
 optimistic spinning

On 6/4/19 5:20 AM, Peter Zijlstra wrote:
> On Mon, May 20, 2019 at 04:59:14PM -0400, Waiman Long wrote:
>> @@ -286,6 +325,7 @@ struct rwsem_waiter {
>>  	struct task_struct *task;
>>  	enum rwsem_waiter_type type;
>>  	unsigned long timeout;
>> +	long last_rowner;
>>  };
>>  #define rwsem_first_waiter(sem) \
>>  	list_first_entry(&sem->wait_list, struct rwsem_waiter, list)
>> +static inline bool rwsem_reader_phase_trylock(struct rw_semaphore *sem,
>> +					      long last_rowner)
>> +static inline bool rwsem_reader_phase_trylock(struct rw_semaphore *sem,
>> +					      unsigned long last_rowner)
>> +	waiter.last_rowner = atomic_long_read(&sem->owner);
> That's somewhat inconsistent wrt the type. I'll make it unsigned long,
> as that is what makes most sense, given there's a pointer inside.

Thank for spotting that, I will fix it.

-Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ