On Wed, May 21, 2014 at 02:26:35AM -0400, Nir Soffer wrote:
----- Original Message -----
> From: "David Teigland" <teigland(a)redhat.com>
> To: "Nir Soffer" <nsoffer(a)redhat.com>
> Cc: sanlock-devel(a)lists.fedorahosted.org, "Federico Simoncelli"
<fsimonce(a)redhat.com>, "Allon Mureinik"
> <amureini(a)redhat.com>, "Dan Kenigsberg" <danken(a)redhat.com>
> Sent: Wednesday, May 14, 2014 5:58:42 PM
> Subject: Re: Releasing host id takes 4-6 seonds - is this epxected beahvioir?
>
> On Wed, May 14, 2014 at 10:29:16AM -0400, Nir Soffer wrote:
> > Can we expect that removing a lockspace will be much faster?
>
> The synchronous rem_lockspace looks very much like it could be sped up.
> Do you not want to use REM_ASYNC?
We don't have any documentation explaining the need for synchronous version.
Federico, can we use asynchronous version?
Keep in mind that if you do an async rem_lockspace, and then do
add_lockspace (for the same lockspace) before the remove is done, you'll
get -EAGAIN from the add.
> If not, then I'll look at optimizing
> the sync rem.
This seems to be a good idea anyway. Can you explain why the current code takes
4-5 seconds? What is the bottleneck there?
It's probably from a sleep(1) delay in a couple loops. At least the one
in rem_lockspace_wait looks like it can be easily changed, so I'll put
that on my list.
Dave