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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 6363EC432BE for ; Thu, 22 Jul 2021 20:11:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44A0460EB5 for ; Thu, 22 Jul 2021 20:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230458AbhGVTak (ORCPT ); Thu, 22 Jul 2021 15:30:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45087 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbhGVTai (ORCPT ); Thu, 22 Jul 2021 15:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626984673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQiDBKKD741DQtVrx05XHx6TnZPGQkq3WyPqWgsemgI=; b=UgWJ7u7JY3eZsNvzVA2B/FtXvpJVF7FJCs8U8TODR/MO7TnCr0GuVAHyYGgRfGZEqe1F3o eMoArk/ZUAEGt4boFLRfx8bhoySqYvmjbZEA3KzdVDfvJYnLkzJDHSVSo/VBUvdljqmMRA xyVkD3ohk0eRBRpcwpQhfZrqS18Z0dI= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-CK2ZxWbwPKOb0N4Ke7Q4Bg-1; Thu, 22 Jul 2021 16:11:11 -0400 X-MC-Unique: CK2ZxWbwPKOb0N4Ke7Q4Bg-1 Received: by mail-il1-f200.google.com with SMTP id o8-20020a92c6880000b0290214927ba4d8so4187212ilg.6 for ; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FQiDBKKD741DQtVrx05XHx6TnZPGQkq3WyPqWgsemgI=; b=litNtTRyuJUz7vlf06IneD+YTsXgLemFnBCiWIt8ZuQ6J35/jEX5cVwN2HEgCULoKx 2+glY3E7b1g4kNfPvMoZBTBtnrkz//QHs5OF0dMP55t+HjJu2/felDfcwU0vsmJOU2tX Pbzp4PeIXm0Z3Jy/mYjfxfhrWZ6rUZNzALU7cVWBajdfMzpAHwae/wqKPq8k3uAi+npg D15575A0DFYJb6CY8YuegmjU86TK284mAx/8R0CKq/vXDcsphXg6L8Xd0N/ALo5wZPe7 3Xkobg0iyf+aeBEhO23lzEgEsT7tc2gQR7DFZRjVOwGsGs/BtrITCy4MJxhU2lztw5hi ZAFA== X-Gm-Message-State: AOAM531s+4cIAyPCdMdNwzqsTQ+gCZJUiTO8dFdRTexoScLT1yUSkiLF 8z+kXTpcXuaa0VbvPg8wlKhgs+exVZ7gEKG72vkcRTNTcMKgQg0G+XMhn0D1IjNnj5cCFWI8BaJ KUfpJnLnzm928oOj5Fl3S0ynQ X-Received: by 2002:a5d:89d6:: with SMTP id a22mr1111580iot.178.1626984671238; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJFAwPs+9TaQkgJnqjWfck0s69NuWgcN/6K4dwXO71x1EdNm8aK86jdgf3quWKyPITk0/jbg== X-Received: by 2002:a5d:89d6:: with SMTP id a22mr1111572iot.178.1626984671066; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) Received: from halaneylaptop (068-184-200-203.res.spectrum.com. [68.184.200.203]) by smtp.gmail.com with ESMTPSA id r1sm14629137ilt.37.2021.07.22.13.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 13:11:10 -0700 (PDT) Date: Thu, 22 Jul 2021 15:11:05 -0500 From: Andrew Halaney To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, x86@kernel.org, Catalin Marinas , Will Deacon , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Peter Zijlstra (Intel)" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Brown , Dave Martin , Ard Biesheuvel Subject: Re: [PATCH 0/3] sched, x86, arm64: PREEMPT_RT, FPU and preemption Message-ID: <20210722201105.kcja2ndxv7rtsrbi@halaneylaptop> References: <20210722175157.1367122-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722175157.1367122-1-valentin.schneider@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 06:51:54PM +0100, Valentin Schneider wrote: > Hi folks, > > This stems from some more v5.13-rt1 breakage on arm64. This time per-CPU access > safety isn't sufficient, we really need to keep preemption disabled. > > In a happy accident I stumbled on > > cba08c5dc6dc ("x86/fpu: Make kernel FPU protection RT friendly") > > so I packaged what was done there into some common helpers and plastered them > over the problematic areas. > > Cheers, > Valentin > > Valentin Schneider (3): > sched/preempt: Introduce preempt_{enable, disable}_bh() > x86/fpu: Make FPU protection reuse common helper > arm64/fpsimd: Fix FPSIMD context handling vs PREEMPT_RT > > arch/arm64/kernel/fpsimd.c | 6 ++++-- > arch/x86/include/asm/fpu/api.h | 19 ++----------------- > include/linux/bottom_half.h | 26 ++++++++++++++++++++++++++ > 3 files changed, 32 insertions(+), 19 deletions(-) > > -- > 2.25.1 > I'm an outsider on all of this, but this series makes sense and looks good to me. Reviewed-by: Andrew Halaney 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=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 3B210C4338F for ; Thu, 22 Jul 2021 20:14:41 +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 08DAB60EB8 for ; Thu, 22 Jul 2021 20:14:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 08DAB60EB8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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=sh9MnkOyWHhEBQqmvNcF98giHn2djVBdPvAdhlY5im4=; b=35MBuZQrYWc9E8 lf8RXBUXnM2/42Mv/uPuJ6yXmRS26nQ2euPQUDCNz3lhuq/EE0H1zTt/CR1cpg2F4u75KmZkXYDhV isUsZYwSjzgpl8VrEMDDoFDrtc4y3E3aYZTaDAIT+N8B1afxPVRUn4WoRcpxX8RiB2ysTlACNL7ev jqvNNfeRn3/mJDUsSfLDMYIVh1CM+vbf318auj+2OZhBp5nFqLAW2S6h+feooNF4zU6fcpe2Zaced yQw+3YuGMNu6VYI7hq903w0sSUuNwhfYsUi27G/KsVC2VYxBGrL/i6T13qIZnjjpJULIhIhkc7S5/ LE9vHlQlPQ32phfH6+tA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6f44-002fjN-VA; Thu, 22 Jul 2021 20:13:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6f41-002fiD-77 for linux-arm-kernel@lists.infradead.org; Thu, 22 Jul 2021 20:13:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626984778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQiDBKKD741DQtVrx05XHx6TnZPGQkq3WyPqWgsemgI=; b=g8A+NxrBhcrNbxqdBRp1D99dgIBjsOMXieDagdENmRoqm2H9W2h60T7kBOkWoHJcuYqh4M sfdHRzp+dVFXFnQ99QiBrbpQPjRxEk9Ucpp5NKflgJfrsFZ+oUgmGLBF0mSpQU27ytkp1E uUe97FNvYRMamgyShGJeAVa9s7hoDmA= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-Whdwbuh6MwqmGjfAb0wXsA-1; Thu, 22 Jul 2021 16:11:11 -0400 X-MC-Unique: Whdwbuh6MwqmGjfAb0wXsA-1 Received: by mail-il1-f199.google.com with SMTP id f5-20020a92b5050000b02901ff388acf98so4220548ile.2 for ; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FQiDBKKD741DQtVrx05XHx6TnZPGQkq3WyPqWgsemgI=; b=q608P1AmbdemNttaQJygFUljzoOMPzxELPXmMvnyfrQsoTGgqu9OlOuyO7eKS8GZoD JrI8cev+Oj277mloCgHYMXJRE62vZ94TxNx2Uiplb6RyxLpJdOs8HZ3+xaVo1lIhbLYw OtbmsWL0UduTxtAokKTCDzzidkNOw+UMOj6HgzK77Ey8riTjMRkH9o1OBVvWplh/Aa4D xk3VpKe0i/O9DfP2th1p0nYNEmWjJ+HSDeX1rYmdTk2swn79R3JiLra5yCEYr4uRZmhY asp+5fEm01hAIa9KK+XU4k+ejglOmBPY1bah/DediTqHXMlfQ/yxq3WN5AZFsQ70Ya+R eA3g== X-Gm-Message-State: AOAM530INt/kiAJUvcb6MocZZM0RCYH9xT+H+ZiXguaGEmZpFIG2m7Nm ESBhlLK2i3rEMaSaVbZtB5jGYgh+RD6lYgywHhvf/Vg127lS0kn3aam/EXJ0IzTG3gV4dEsSqdU uwdQWxab0uFatnIjsXZq9/gS2O38lbIRWAms= X-Received: by 2002:a5d:89d6:: with SMTP id a22mr1111596iot.178.1626984671250; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJFAwPs+9TaQkgJnqjWfck0s69NuWgcN/6K4dwXO71x1EdNm8aK86jdgf3quWKyPITk0/jbg== X-Received: by 2002:a5d:89d6:: with SMTP id a22mr1111572iot.178.1626984671066; Thu, 22 Jul 2021 13:11:11 -0700 (PDT) Received: from halaneylaptop (068-184-200-203.res.spectrum.com. [68.184.200.203]) by smtp.gmail.com with ESMTPSA id r1sm14629137ilt.37.2021.07.22.13.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 13:11:10 -0700 (PDT) Date: Thu, 22 Jul 2021 15:11:05 -0500 From: Andrew Halaney To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, x86@kernel.org, Catalin Marinas , Will Deacon , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Peter Zijlstra (Intel)" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Brown , Dave Martin , Ard Biesheuvel Subject: Re: [PATCH 0/3] sched, x86, arm64: PREEMPT_RT, FPU and preemption Message-ID: <20210722201105.kcja2ndxv7rtsrbi@halaneylaptop> References: <20210722175157.1367122-1-valentin.schneider@arm.com> MIME-Version: 1.0 In-Reply-To: <20210722175157.1367122-1-valentin.schneider@arm.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ahalaney@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210722_131301_377408_3F4D0963 X-CRM114-Status: GOOD ( 15.17 ) 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 22, 2021 at 06:51:54PM +0100, Valentin Schneider wrote: > Hi folks, > > This stems from some more v5.13-rt1 breakage on arm64. This time per-CPU access > safety isn't sufficient, we really need to keep preemption disabled. > > In a happy accident I stumbled on > > cba08c5dc6dc ("x86/fpu: Make kernel FPU protection RT friendly") > > so I packaged what was done there into some common helpers and plastered them > over the problematic areas. > > Cheers, > Valentin > > Valentin Schneider (3): > sched/preempt: Introduce preempt_{enable, disable}_bh() > x86/fpu: Make FPU protection reuse common helper > arm64/fpsimd: Fix FPSIMD context handling vs PREEMPT_RT > > arch/arm64/kernel/fpsimd.c | 6 ++++-- > arch/x86/include/asm/fpu/api.h | 19 ++----------------- > include/linux/bottom_half.h | 26 ++++++++++++++++++++++++++ > 3 files changed, 32 insertions(+), 19 deletions(-) > > -- > 2.25.1 > I'm an outsider on all of this, but this series makes sense and looks good to me. Reviewed-by: Andrew Halaney _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel