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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 477CDEF8FF4 for ; Wed, 4 Mar 2026 15:09:53 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fQx0v3jCcz3c1T; Thu, 05 Mar 2026 02:09:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772636991; cv=none; b=nOUlF5loPpvMIxVnisUcpmEoxtTHRnYWmxU7CL7/s3F7w+rwwKpsy8CRhzLjzY4JwzJRHYcb498ZPJ3tTp9T85gfyKQePB2AUtMO+/cV33C5LuyAtsddz+dh/JQAP1potHMRNpPqHMMwFUk3SR7049dPDaOKQyiWNzoNulpy+FHL11CNFc2QlgqcMNT7h0sWVj17HoozP8XHO/rEbNuyLnai223OMlZfqC1fTaSmZHoYu1IuINNrzaXSsZeX0aeIdlnzI8JrhOM6sYyzgQyL0kLtYc841NWVNohxaYGwiycuWyeQHM6aD9PBRygGgIhq0VDINH3nKxHj10pOIrj5Bw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772636991; c=relaxed/relaxed; bh=UnYxYUy+8zrFTWbwR9LeZFJwwqG9YYaU/e//3QPYJZ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QqcmvnRxmraXzffvQ6SLGmEAkbAoNiEdYK4dKycJT4GvincAaSvKj661w3mZgG7WKmufL5ThtY5Jahv2ZWOJH94B3QWITToNkl/XJblk3jJsaNdEqkF5Pl3sgoMdmH6o6aPEGEf38Y4P1JsbSgMsO8Jyz20MWwIJ32Bm8s/APs2stpxMPOiKNgbza5hyLQ1NjYkUnZ5+Cncs2eooXm+xd13PjVo0j4sH2vJh0N8RwiggT2zvmC7djm8L70VQK1BLJChURz25e2QiaZY9hVMcWd8pSMOwHnnJfaGTo6/3JTlY1jiN6NPiG0t3+JEuZgOjFpYvs7S7lRB9Ymx+pgUuoQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FZNErBDp; dkim-atps=neutral; spf=pass (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=hca@linux.ibm.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FZNErBDp; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=hca@linux.ibm.com; receiver=lists.ozlabs.org) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fQx0t4WXlz3btw for ; Thu, 05 Mar 2026 02:09:50 +1100 (AEDT) Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6247KJ691508241; Wed, 4 Mar 2026 15:08:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pp1; bh=UnYxYUy+8zrFTWbwR9LeZFJwwqG9YY aU/e//3QPYJZ4=; b=FZNErBDp6qjhxSEbMiU9l04mc298SEH8tvnPLaJ9ean4A7 7K2xPOV8CgfxJ0imtFEqEnzLpkzNC4c/bEg2Hvea3i/uSbisjwgNBmjI3cUiAuyX XPPgoEI4BzihZrjSOdrN8yM7PcU2sVQb++QWYxMPVUMr/lisSRi9AuVwiLitXCAm 1X+EB0luNAC+JaoFK3v3/WvLJxDgTwYOKiaqsfcSrhQqUEaV60drcDSUJi+1u8+4 hT5jkYKrixvnhvlk5C829/WjbjQwNdjiyQUwSpLNw3r00Hlu0Mex784CEb0aa58m fVEriNiAX4lHjUycOThSzI4JSS9skGA9/I1ieitw== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4cksk3yfpp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Mar 2026 15:08:42 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 624EU8Rs016408; Wed, 4 Mar 2026 15:08:41 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4cmbpn74yg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Mar 2026 15:08:41 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 624F8ahj25100704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Mar 2026 15:08:36 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B983C20040; Wed, 4 Mar 2026 15:08:36 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D11C420043; Wed, 4 Mar 2026 15:08:33 +0000 (GMT) Received: from osiris (unknown [9.111.25.254]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Wed, 4 Mar 2026 15:08:33 +0000 (GMT) Date: Wed, 4 Mar 2026 16:08:32 +0100 From: Heiko Carstens To: Heiko Carstens Cc: Eric Biggers , Christoph Hellwig , Peter Zijlstra , Andrew Morton , Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Andreas Larsson , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Herbert Xu , Dan Williams , Chris Mason , David Sterba , Arnd Bergmann , Song Liu , Yu Kuai , Li Nan , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-arch@vger.kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH 01/25] xor: assert that xor_blocks is not called from interrupt context Message-ID: <20260304150832.10892B56-hca@linux.ibm.com> References: <20260226151106.144735-1-hch@lst.de> <20260226151106.144735-2-hch@lst.de> <20260227142455.GG1282955@noisy.programming.kicks-ass.net> <20260303160050.GB7021@lst.de> <20260303195517.GC2846@sol> <20260304150142.10892A0b-hca@linux.ibm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260304150142.10892A0b-hca@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-ORIG-GUID: 04z9E13OM3Sfpetrjwu_knlQ4Pm57vSK X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA0MDEyMyBTYWx0ZWRfX1qKC5vwiiVti imQl88p4f5EEaUs36Cqd8CD0grmVfOVhch8H/6EkUdKTFPntYFZhNzfiLwzeEcRPVdfmfw/csJd 5XjBomCKez2kWT0xu+TyUO5m86iaOsxE8uVSmI3WWQj0EIwj+0zha8PMo4rZS7UmHkn2EA23gC3 fCKaD2O5LTbrNnhcy/sqDaVZg5VdeGyPlf7sKjPqlGMWdy7lKR+Sx4YT9Ue13j1krenv+apDdTG 9u7pc7ax3/s4b9EW0qdkkSS/EsWcFCshcemu3qKx2gHNe1V0XILuw8E8ekEbHaLm1XHrSGLXtR7 0VblM3ek7WLeLeq24Eb3kVOGtogA+y9AGwS9Ox7ga75U7hxD6x81KJm+aga4X4uPi6MKdrTmsXu Fw4NYf7Aga7uVW+KCzrlr3ubI8K6ypZGyMfLvJiVX97w/NtWfeIQ5EAiC+Bq+Ht/ezhYzKmvaFi hJyU1cpGtH/CwXFvztA== X-Authority-Analysis: v=2.4 cv=csCWUl4i c=1 sm=1 tr=0 ts=69a84afb cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=kj9zAlcOel0A:10 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=Lex053stx4sflTLgQTUA:9 a=CjuIK1q_8ugA:10 X-Proofpoint-GUID: EsSB8XvTAoZu7uY0i22CxoZDWK6YvNNN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-04_06,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603040123 On Wed, Mar 04, 2026 at 04:01:46PM +0100, Heiko Carstens wrote: > On Tue, Mar 03, 2026 at 11:55:17AM -0800, Eric Biggers wrote: > > On Tue, Mar 03, 2026 at 05:00:50PM +0100, Christoph Hellwig wrote: > > > On Fri, Feb 27, 2026 at 03:24:55PM +0100, Peter Zijlstra wrote: > > Because of that CPU feature check, I don't think > > "WARN_ON_ONCE(!may_use_simd())" would actually be correct here. > > > > How about "WARN_ON_ONCE(!preemptible())"? I think that covers the union > > of the context restrictions correctly. (Compared to in_task(), it > > handles the cases where hardirqs or softirqs are disabled.) > > I guess, this is not true, since there is at least one architecture which > allows to run simd code in interrupt context (but which missed to implement > may_use_simd()). Oh, just to avoid confusion, which I may have caused: I made only general comments about s390 simd usage. Our xor() implementation does not make use of simd, since our normal xc instruction allows to xor up to 256 bytes. A simd implementation wouldn't be faster. Also here it would be possible to run it in any context.