linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/2] padata: initialize usable masks to reflect offlined CPU
Date: Thu, 22 Aug 2019 18:11:38 -0400	[thread overview]
Message-ID: <fc23525a-431f-b714-2384-f707ce50c428@oracle.com> (raw)
In-Reply-To: <20190822035143.GB32551@gondor.apana.org.au>

On 8/21/19 11:51 PM, Herbert Xu wrote:
> On Mon, Aug 12, 2019 at 05:02:00PM -0400, Daniel Jordan wrote:
>> __padata_remove_cpu clears the offlined CPU from the usable masks after
>> padata_alloc_pd has initialized pd->cpu, which means pd->cpu could be
>> initialized to this CPU, causing padata to wait indefinitely for the
>> next job in padata_get_next.
>>
>> Make the usable masks reflect the offline CPU when they're established
>> in padata_setup_cpumasks so pd->cpu is initialized properly.
>>
>> Fixes: 6fc4dbcf0276 ("padata: Replace delayed timer with immediate workqueue in padata_reorder")
>> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
>> Cc: Herbert Xu <herbert@gondor.apana.org.au>
>> Cc: Steffen Klassert <steffen.klassert@secunet.com>
>> Cc: linux-crypto@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>>
>> Hi, one more edge case.  All combinations of CPUs among
>> parallel_cpumask, serial_cpumask, and CPU hotplug have now been tested
>> in a 4-CPU VM, and an 8-CPU VM has run with random combinations of these
>> settings for over an hour.
>>
>>   kernel/padata.c | 18 ++++++++++++++----
>>   1 file changed, 14 insertions(+), 4 deletions(-)
> 
> If we modify patch 2/2 by calling this after cpu_online_mask
> has been updated then this problem should go away because we
> can then remove the cpumask_clear_cpu calls.

Yep, agreed.

  reply	other threads:[~2019-08-22 22:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 19:28 [PATCH 1/2] padata: always acquire cpu_hotplug_lock before pinst->lock Daniel Jordan
2019-08-09 19:28 ` [PATCH 2/2] padata: validate cpumask without removed CPU during offline Daniel Jordan
2019-08-09 21:06   ` [PATCH v2] " Daniel Jordan
2019-08-12 21:02     ` [PATCH 3/2] padata: initialize usable masks to reflect offlined CPU Daniel Jordan
2019-08-22  3:51       ` Herbert Xu
2019-08-22 22:11         ` Daniel Jordan [this message]
2019-08-22  3:50     ` [PATCH v2] padata: validate cpumask without removed CPU during offline Herbert Xu
2019-08-22 22:10       ` Daniel Jordan
2019-08-22 22:53         ` Daniel Jordan
2019-08-15  5:15 ` [PATCH 1/2] padata: always acquire cpu_hotplug_lock before pinst->lock Herbert Xu
2019-08-21  4:14   ` Daniel Jordan
2019-08-21  6:43     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc23525a-431f-b714-2384-f707ce50c428@oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).