[PATCH] login: pututline needs to validate the cache under write lock [BZ #24882]

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Aug 21 19:49:00 GMT 2019



On 21/08/2019 10:20, Florian Weimer wrote:
> * Florian Weimer:
> 
>> 2019-08-12  Florian Weimer  <fweimer@redhat.com>
>>
>> 	[BZ #24882]
>> 	* login/utmp_file.c (file_locking_failed): Report EAGAIN for a
>> 	failure to acquire the lock.
>> 	(internal_getut_nolock): New function.
>> 	Extracted from internal_getut_r.
>> 	(internal_getut_r): Call it.
>> 	(__libc_pututline): Acquire write lock before all read operations.
> 
> It has been pointed out that this causes too much overhead with high
> load.  Scanning entries using the read lock only is apparently important
> for performance.

So do you intend to resend a new version or this extra overhead is required
to fully fix the issue?



More information about the Libc-alpha mailing list