This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]