Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Oct 2014 23:32:38 -0700
From:      Rui Paulo <rpaulo@me.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Robert Watson <rwatson@freebsd.org>, net@freebsd.org
Subject:   Re: [PATCH] Only lock send buffer in sopoll() if needed
Message-ID:  <5442AFCD-14D1-4CCE-B86E-140C534E2C95@me.com>
In-Reply-To: <201409301400.09999.jhb@freebsd.org>
References:  <201409301400.09999.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 30, 2014, at 11:00, John Baldwin <jhb@freebsd.org> wrote:
>=20
> Right now sopoll() always locks both socket buffers.  The receive =
socket=20
> buffer lock is always needed, but the send socket buffer lock is only =
needed=20
> while polling for writing (there is a potential test of =
SBS_CANTSENDMORE=20
> without the lock, but I think this might be ok).  What do folks think?

Does this really help us much?  Are you worried about sending data when =
another thread is polling?

The patch looks ok, but I'm not sure about the handling of POLLHUP.  I =
suppose that's okay since if that flag is set, the socket is =
disconnected.

--
Rui Paulo






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5442AFCD-14D1-4CCE-B86E-140C534E2C95>