From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE061C4338F for ; Thu, 29 Jul 2021 16:36:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BDA960F43 for ; Thu, 29 Jul 2021 16:36:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8BDA960F43 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3upNqeKjh0uyR6QaKgsJzCVBtOZzW/0gU5tFMjK4oXI=; b=wkkiMeww48Ot3Q wCuOVXJu1t9R7BzlfTuic+hTi8J0ywJeIoNrtiWIHMyz0a6WtiPp/DwwTVFuaiibNmrYeLU/hymKL 442D+pY+fxgWwCKNcp6DJVWHiaCZi1ZvqfnCl38DaWR/oNwKtdA6ooJXQO9KegxauQxqL9duYFVfK 6yKl9eMmDQ61EzV5aqQAa7W/0jc6i6t8YGHNH0zXXUAa/fJh5uX3+li1/RE/H+hW7S0ZfqfiNKKcq /4btZc3pq6UYsoF9ZEc5Kup6dIrfGLLYwByjZBa6/+gpXpyBlUYMv7NZV7+0I2Ou6mjfw2BFq4aVz D6Y9j2BHQCPZv5fBe+nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m98z2-0056iS-Qt; Thu, 29 Jul 2021 16:34:08 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m98yl-0056fS-5v for linux-arm-kernel@lists.infradead.org; Thu, 29 Jul 2021 16:33:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8F6C51FB; Thu, 29 Jul 2021 09:33:49 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C33C33F73D; Thu, 29 Jul 2021 09:33:48 -0700 (PDT) Date: Thu, 29 Jul 2021 17:32:27 +0100 From: Dave Martin To: Sebastian Andrzej Siewior Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Thomas Gleixner Subject: Re: [PATCH] arm64/sve: Make kernel FPU protection RT friendly Message-ID: <20210729163227.GR1724@arm.com> References: <20210729105215.2222338-1-bigeasy@linutronix.de> <20210729105215.2222338-3-bigeasy@linutronix.de> <20210729135459.GL1724@arm.com> <20210729141748.q66pfjoma2a2qd2k@linutronix.de> <20210729153422.GN1724@arm.com> <20210729160030.p76p56r56vx4qoql@linutronix.de> <20210729160756.s6kvhvbdy2erqeq7@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210729160756.s6kvhvbdy2erqeq7@linutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210729_093351_317020_26FDC5C9 X-CRM114-Status: GOOD ( 15.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 29, 2021 at 06:07:56PM +0200, Sebastian Andrzej Siewior wrote: > On 2021-07-29 18:00:31 [+0200], To Dave Martin wrote: > > > > But I get what you mean. I'm just not sure regarding the naming since > > the code behaves the same on x86 and arm64 here. > > Assuming that everyone follows this pattern what about > fpregs_lock() > fpregs_unlock() I'm not sure about the "fpregs". This is really about CPU-local resources that are contended between softirq and task context. Some arches might not to use fp in softirq context and then their fp regs wouldn't need this; others might have other resources that aren't "fp" regs, but are contended in the same way. My "local_bh" was meaning purely softirqs running on this CPU. This was the original meaning of "local" in this API IIUC. This is one reason why they must disable preemption: "local" is meaningless if preemption is enabled, since otherwise we might randomly migrate between CPUs. I guess the "local" was preserved in the naming on PREEMPT_RT to reduce the amount of noise that would have resulted from a treewide rename, but this word seems confusing if there is no CPU-localness involved. In this particular case, we really do want to bind ourselves onto the current CPU and disable softirqs on this CPU -- if they continue to run elsewhere, that's just fine. What do you think about: get_bh_cpu_context() put_bh_cpu_context() or something along those lines? Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel