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 63B39FF4925 for ; Sun, 29 Mar 2026 22:51:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fkV473b62z2xSb; Mon, 30 Mar 2026 09:51:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774824695; cv=none; b=ghd2e9S3gOAELLBVrGFbVPscEI/ozBi8rZ+kObp+AvkDa1h47eRb8OXOgUtMHF0FwP3yqb5k9sGyzyGKmYbWi1f8tHQFYfKUIv53yVdgywPFkybCNsXNz7VnsS/B0zH9dahuBaDnff6fk+i7BJZDwSCznNa6lkFWf3X+W2q9WlDvyZecGxWTwgEF0df5JLMnKPLaeiNnpcTT1BYms8aVt2YR/I6YPl70Wptex2xeTHIkoIEeDNmdCDsF4rJjZXLtOi8xgddSkByeYJ+E6Xt0P4tQknE7eJpj0eDtsb9DUoEtjUKRlco2nap2oEpbi0IKu53Ry1/xBibHSvyEqbNFoA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774824695; c=relaxed/relaxed; bh=u0SXbeRpiZs7ig3ieosiJc6q5c26LwyyLnuthhbzsuQ=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=SMQ17OyB8Jyb9Rnd0RFJiYVi1QWhkGtUUUx3Y08R3zqcYKpjS5r+TFV69gtpRqsE0KWjf3/JmnHBeCXRB/lL7xFp0L8r+LAVjPG9CNzreifP9kJPQsAv+W5D24Lb/mv4HKJcifevs0LDwklK2hdyh+9rSUgQC6wNhcJpQLftn6Yt9k/ojoRgTHncz3+6s6v4AnjcX6dOtDlkhp37w8xr9qxfZMrCBozOB/HlW8ETgoKWBvulo6s8gqHKM3m+3D1hnpKgZcDX5qhTyb1uek97IPU80wpwGRQQ7uDYWOpiQHh+LxLELLoEQrglKQ6ETXc+4p9x00cRpYsSqMklu/hFKg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=JBtLNNMx; dkim-atps=neutral; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=akpm@linux-foundation.org; receiver=lists.ozlabs.org) smtp.mailfrom=linux-foundation.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=JBtLNNMx; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux-foundation.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=akpm@linux-foundation.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (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 4fkV4516lLz2xNT for ; Mon, 30 Mar 2026 09:51:32 +1100 (AEDT) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id EA67860054; Sun, 29 Mar 2026 22:51:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB6B6C116C6; Sun, 29 Mar 2026 22:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774824688; bh=xC03r/4dJ8Us44QpgIA9Ngu2zy8kWGCxh9mj0ZxoTHs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JBtLNNMxkC+Qck2+BGDNaaVFR64izaAKQJSJUR3TFGlVL+zj0esYpoV9thVBYizo5 2LdTKTg4q97XSRSKSMqWeByHX3v4Kwd3ip5W8A7e9SWOk90u7h9T0PIyI9/hHuozRw xIxWNYXda49DMygxwfzePxOY5aQGe8Krgc64/5fY= Date: Sun, 29 Mar 2026 15:51:26 -0700 From: Andrew Morton To: Eric Biggers Cc: Christoph Hellwig , Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Catalin Marinas , Will Deacon , Ard Biesheuvel , Huacai Chen , WANG Xuerui , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , 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 , Theodore Ts'o , "Jason A. Donenfeld" , 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: cleanup the RAID5 XOR library v4 Message-Id: <20260329155126.a01a5729b7d8376712182851@linux-foundation.org> In-Reply-To: <20260329213119.GA2106@quark> References: <20260327061704.3707577-1-hch@lst.de> <20260329213119.GA2106@quark> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Sun, 29 Mar 2026 14:31:19 -0700 Eric Biggers wrote: > On Fri, Mar 27, 2026 at 07:16:32AM +0100, Christoph Hellwig wrote: > > Hi all, > > > > the XOR library used for the RAID5 parity is a bit of a mess right now. > > The main file sits in crypto/ despite not being cryptography and not > > using the crypto API, with the generic implementations sitting in > > include/asm-generic and the arch implementations sitting in an asm/ > > header in theory. The latter doesn't work for many cases, so > > architectures often build the code directly into the core kernel, or > > create another module for the architecture code. > > > > Changes this to a single module in lib/ that also contains the > > architecture optimizations, similar to the library work Eric Biggers > > has done for the CRC and crypto libraries later. After that it changes > > to better calling conventions that allow for smarter architecture > > implementations (although none is contained here yet), and uses > > static_call to avoid indirection function call overhead. > > > > A git tree is also available here: > > > > git://git.infradead.org/users/hch/misc.git xor-improvements > > > > Gitweb: > > > > https://git.infradead.org/?p=users/hch/misc.git;a=shortlog;h=refs/heads/xor-improvements > > > > Changes since v3: > > - switch away from lockdep_assert_preemption_enabled() again > > - fix a @ reference in a kerneldoc comment. > > - build the arm4regs implementation also without kernel-mode neon > > support > > - fix a pre-existing issue about mismatched attributes on arm64's > > xor_block_inner_neon > > - reject 0-sized xor request and adjust the kunit test case to not > > generate them > > Reviewed-by: Eric Biggers Great, thanks, added to all changelogs. > But yes, as Andrew mentioned there are two "xor: add a better public > API" patches. They should be folded together. I folded them. I'm a bit wobbly about upstreaming all this for 7.1-rc1. It hits on a lot of stuff and I don't think we've heard a lot from the affected maintainers. otoh, we're unlikely to learn much from an additional nine weeks in linux-next so at some point one has to forge ahead and rely on seven weeks of -rc to address any remaining niggles. And I'm confident that Christoph will support his work well. But still, hearing some reassuring words about this would be appreciated ;)