[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1707261703180.22381@sstabellini-ThinkPad-X260>
Date: Wed, 26 Jul 2017 17:08:36 -0700 (PDT)
From: Stefano Stabellini <sstabellini@...nel.org>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>
cc: Stefano Stabellini <sstabellini@...nel.org>,
xen-devel@...ts.xen.org, jgross@...e.com,
Stefano Stabellini <stefano@...reto.com>,
linux-kernel@...r.kernel.org
Subject: Re: [Xen-devel] [PATCH v2 09/13] xen/pvcalls: implement recvmsg
On Wed, 26 Jul 2017, Boris Ostrovsky wrote:
> >> + count++;
> >> + else
> >> + wait_event_interruptible(map->active.inflight_conn_req,
> >> + pvcalls_front_read_todo(map));
> >> + }
> > Should we be using PVCALLS_FRONT_MAX_SPIN here? In sendmsg it is
> > counting non-sleeping iterations but here we are sleeping so
> > PVCALLS_FRONT_MAX_SPIN (5000) may take a while.
> >
> > In fact, what shouldn't this waiting be a function of MSG_DONTWAIT
>
> err, which it already is. But the question still stands (except for
> MSG_DONTWAIT).
The code (admittedly unintuitive) is busy-looping (non-sleeping) for
5000 iterations *before* attempting to sleep. So in that regard, recvmsg
and sendmsg use PVCALLS_FRONT_MAX_SPIN in the same way: only for
non-sleeping iterations.
Powered by blists - more mailing lists