Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp337963yba; Fri, 5 Apr 2019 07:42:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx3Dtg8CbUXiUKWHJD9lQ6q2txPp+exhHajcO0n+i7HTHX0NR3g6Mk1lK65BgsSAQZvOpQ X-Received: by 2002:a17:902:47c2:: with SMTP id d2mr13248811plh.277.1554475326155; Fri, 05 Apr 2019 07:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554475326; cv=none; d=google.com; s=arc-20160816; b=cx5BDces/a9CR4rpadDJRzYGhM8rX1l8rWglUcLWCib28sQ+OV0tGsGnrI/BEAH9gE xo37vFGW9C2DMzp5Fu4AewnM7PIG7vHKvUs/pKrSR22u8qCFb2A5ldMgNCCnk87vfiC8 AXmu0zXQMe3y45yyLrmNRWRlChKLkXPEEEqOujsVrCPYw21osdajJQuooMggOC3Kwmo9 63McZLn3PzwDOBTWJLljystekLJ/rU9AOLXIxnEUHnX58GNLanZZ0WLgJ3aBi3sagOP4 i5BjLUX3F1UA0Vy9ijOXbSq2HhwrOB+RqK2KxoPfZm+Ujj4fOr7erVmG5S/PzucIcZUm pytw== 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=l8iC4hZ2ae3boxU5JiVuIFUdDf710u9/dIB0+7+iyXk=; b=T3xEpjR5JBj1gnV/tlnaDgzjL2+MS3hx+NccB7so2tiNVRb8HwNWQ6XbGHQqrmm6FN p6XEY3zah2195NI7OXWwldKSrP1ax5hSUSqf9dC+W3pP/2dq4OGc86x1NJWDnIPco4dO ZgtdFEtOBklm5M3ua/P1e3qqMEkkPZYPWOH2VdJHFpez2iT43wxeNEub28I0LkSf8sXk LsW6L0WM7iKd2b2TZzR7lHvRS9zjyG2YMGnBgvSnjvZ0YOd7BTWgW0COq64yv6t3RP5Z 0k/Jkv72WghzetboBwN4SaU3rYjaAkFKSLeqUMyCnUctwfkR+Yo5itiRmNLjZ4CQa7we y6gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 r80si19539077pfa.128.2019.04.05.07.41.51; Fri, 05 Apr 2019 07:42:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731428AbfDEOjs (ORCPT + 99 others); Fri, 5 Apr 2019 10:39:48 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48765 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbfDEOjr (ORCPT ); Fri, 5 Apr 2019 10:39:47 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1hCQ0N-0004qu-7m; Fri, 05 Apr 2019 16:39:43 +0200 Date: Fri, 5 Apr 2019 16:39:43 +0200 From: Sebastian Andrzej Siewior To: Julien Grall Cc: Dave Martin , linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state Message-ID: <20190405143942.xtpq5443qbc4gziy@linutronix.de> References: <20190208165513.8435-1-julien.grall@arm.com> <20190404105233.GD3567@e103592.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-04-05 10:02:45 [+0100], Julien Grall wrote: > RT folks already saw this corruption because local_bh_disable() does not > preempt on RT. They are carrying a patch (see "arm64: fpsimd: use > preemp_disable in addition to local_bh_disable()") to disable preemption > along with local_bh_disable(). > > Alternatively, Julia suggested to introduce a per-cpu lock to protect the > state. I am thinking to defer this for a follow-up patch. The changes in > this patch should make it easier because we now have helper to mark the > critical section. A per-CPU lock? It has to be a raw_spinlock_t because a normal spin_lock() / local_lock() would allow scheduling and might be taken as part of the context switch or soon after. Sebastian