[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190718033008.wle67s7esg27mrtz@gondor.apana.org.au>
Date: Thu, 18 Jul 2019 11:30:08 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Daniel Jordan <daniel.m.jordan@...cle.com>
Cc: Steffen Klassert <steffen.klassert@...unet.com>,
Andrea Parri <andrea.parri@...rulasolutions.com>,
Boqun Feng <boqun.feng@...il.com>,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-arch@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mathias Krause <minipli@...glemail.com>
Subject: Re: [PATCH] padata: Replace delayed timer with immediate workqueue
in padata_reorder
On Wed, Jul 17, 2019 at 07:21:36PM -0400, Daniel Jordan wrote:
>
> > @@ -388,12 +336,12 @@ void padata_do_serial(struct padata_priv *padata)
> > pqueue = per_cpu_ptr(pd->pqueue, cpu);
> >
> > spin_lock(&pqueue->reorder.lock);
> > - atomic_inc(&pd->reorder_objects);
> > list_add_tail(&padata->list, &pqueue->reorder.list);
> > + atomic_inc(&pd->reorder_objects);
>
> Why switch the lines? Seems ok to not do this.
This is crucial because otherwise the memory barrier won't apply
to the list insertion. With this patch, we are now using the list
insertion as the indicator, rather than reorder_objects.
> > @@ -538,8 +479,6 @@ static void padata_flush_queues(struct parallel_data *pd)
> > flush_work(&pqueue->work);
> > }
> >
> > - del_timer_sync(&pd->timer);
> > -
>
> > if (atomic_read(&pd->reorder_objects))
> > padata_reorder(pd);
>
> I think we can do away with reorder_objects entirely by checking pd->cpu's
> reorder queue here.
As I said this will probably disappear altogether since we can't
guarantee that padata_reorder will actually do anything if the
jobs are stuck in async crypto processing.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists