svn commit: r364201 - stable/12/usr.sbin/nscd
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Aug 13 17:42:51 UTC 2020
Author: trasz
Date: Thu Aug 13 17:42:50 2020
New Revision: 364201
URL: https://svnweb.freebsd.org/changeset/base/364201
Log:
MFC r343121:
Workaround for nscd(8) failure with large entries.
It fixes a case where eg a 2KB group entry would take several seconds
to complete with cache enabled in nsswitch.conf.
Modified:
stable/12/usr.sbin/nscd/nscd.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/usr.sbin/nscd/nscd.c
==============================================================================
--- stable/12/usr.sbin/nscd/nscd.c Thu Aug 13 17:41:29 2020 (r364200)
+++ stable/12/usr.sbin/nscd/nscd.c Thu Aug 13 17:42:50 2020 (r364201)
@@ -405,6 +405,12 @@ process_socket_event(struct kevent *event_data, struct
* process_socket_event).
*/
if (qstate->kevent_watermark > MAX_SOCKET_IO_SIZE) {
+#if 0
+ /*
+ * XXX: Uncommenting this code makes nscd(8) fail for
+ * entries larger than a few kB, causing few second
+ * worth of delay for each call to retrieve them.
+ */
if (qstate->io_buffer != NULL)
free(qstate->io_buffer);
@@ -421,6 +427,7 @@ process_socket_event(struct kevent *event_data, struct
if (qstate->kevent_filter == EVFILT_READ)
qstate->use_alternate_io = 1;
+#endif
qstate->io_buffer_watermark = MAX_SOCKET_IO_SIZE;
EV_SET(&eventlist[1], event_data->ident,
More information about the svn-src-all
mailing list