]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Export sbuf_drain to orchestrate lock and drain action
authorRichard Scheffenegger <rscheff@FreeBSD.org>
Wed, 31 Mar 2021 16:25:53 +0000 (18:25 +0200)
committerRichard Scheffenegger <rscheff@FreeBSD.org>
Fri, 16 Apr 2021 19:27:15 +0000 (21:27 +0200)
commitdc5281a7d43917c55905d8b83a5bef69b8013071
treec0b44405a59a4038e35789f193eef426abf43c32
parent9cfb2dfada93c84934046d8f8b97c9b2ebb2c02a
Export sbuf_drain to orchestrate lock and drain action

While exporting large amounts of data to a sysctl
request, datastructures may need to be locked.

Exporting the sbuf_drain function allows the
coordination between drain events and held
locks, to avoid stalls.

PR: 254333
Reviewed By: jhb
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29481

(cherry picked from commit c804c8f2c58ba42d476de07fbceff9ac4dd95f0e)
sys/kern/subr_sbuf.c
sys/sys/sbuf.h