This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] login: pututline needs to validate the cache under write lock [BZ #24882]
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 21 Aug 2019 15:20:38 +0200
- Subject: Re: [PATCH] login: pututline needs to validate the cache under write lock [BZ #24882]
- References: <87o90uo5ok.fsf@oldenburg2.str.redhat.com>
* 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