Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp986192ybi; Tue, 16 Jul 2019 08:02:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqylA/mEywuUwSMZvOD85Eoy/UHaSrISzUFPhSKpsyBrJWuIQrCZmZAkJzzxEEUlWP/+9Hci X-Received: by 2002:a63:6f8f:: with SMTP id k137mr34373236pgc.90.1563289345455; Tue, 16 Jul 2019 08:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563289345; cv=none; d=google.com; s=arc-20160816; b=PHqqVwrySvbl1ZKvI475C9NAYbsWcwQ/cFqg5SMcZq032XnIWpZmHrfA2VVpgMoH4P vlX3UPHwQSLbCRBTAgewjE4WnO7jQBPxr5YL3lqEzCoDhlENqRgqVHi2Z3SyCdC3ggeZ pMGmOV0NOyFpbtEpLoF4FfBr+MoBzB7tGFiDPXyS7KTPU5Us1TTXeLcq03uGZoL1kI+B YMrVZQeRlqFAuyVhlT0an/wCC/TNinkkMVV9lM7tVeBHqh+CYZ4AYxSQ4eCBDL82nyua qG20Yoh8bMUFcCSJO/IYRtmAf+fhVWqCGQfuBBJmPRT3fm6Q62jjL7iw55inv2fygB8b TVhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=U7DjZQim0TECGJJ6JLTcxYEr9MZ0bdwlitLWqmfWr6k=; b=Hzx5EzKBNgPeKpTrZ7kcY5BhIJdGPFFKr2iKE1RyuzedjjugCNRvklWRIGB0dpEJeU 9EQ3Ck1ZsaWvw4EL6vrCtMJMMD2RgF6qoPs91MeQV1GDOGdeLpF1D4koJunkeyHHwzfd DL3alkowewz7GNj83mBTOwL5gs2N3pN3219Wu7SgyGs1bT79ldB/XELkmBmprKSJxOuL ukCnFCkbujgYhGQHzFFiYBN2A20zQFw40Ub3FKYDcf5ID3FpzRaUXoHHMHjiuC4rEqqy 5X3UQAhfTPWUrU5OZNtL9E6wnM+fI7T5c6xQDKSdMfaajc0E/tBInpALCrgGUbsP0ZIK NwnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32si19471741pld.402.2019.07.16.08.02.07; Tue, 16 Jul 2019 08:02:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728421AbfGPPCA (ORCPT + 99 others); Tue, 16 Jul 2019 11:02:00 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:34330 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387924AbfGPPB7 (ORCPT ); Tue, 16 Jul 2019 11:01:59 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hnOxg-0007MZ-Ra; Tue, 16 Jul 2019 23:01:48 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hnOxa-00018j-64; Tue, 16 Jul 2019 23:01:42 +0800 Date: Tue, 16 Jul 2019 23:01:42 +0800 From: Herbert Xu To: Andrea Parri Cc: Daniel Jordan , Steffen Klassert , boqun.feng@gmail.com, paulmck@linux.ibm.com, peterz@infradead.org, linux-arch@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs Message-ID: <20190716150142.rebjmpjjiesaiwyt@gondor.apana.org.au> References: <20190711221205.29889-1-daniel.m.jordan@oracle.com> <20190712100636.mqdr567p7ozanlyl@gondor.apana.org.au> <20190712101012.GW14601@gauss3.secunet.de> <20190712160737.iniaaxlsnhs6azg5@ca-dmjordan1.us.oracle.com> <20190716125309.GA10672@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190716125309.GA10672@andrea> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jul 16, 2019 at 02:53:09PM +0200, Andrea Parri wrote: > > P1(atomic_t *reorder_objects, spinlock_t *pd_lock, spinlock_t *reorder_lock) > { > int r1; > > spin_lock(reorder_lock); > atomic_inc(reorder_objects); > spin_unlock(reorder_lock); > //smp_mb(); > r1 = spin_trylock(pd_lock); > } Yes we need a matching mb on the other side. However, we can get away with using smp_mb__after_atomic thanks to the atomic_inc above. Daniel, can you please respin the patch with the matching smp_mb? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt