Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1503452rwi; Thu, 20 Oct 2022 13:23:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zRcRimT5gF4OgXr3hP0O/D0BlQZG2uKelZ8k4nuZrmuQPBPU6hz/SUMLsSOV85on++Ilq X-Received: by 2002:a17:907:3e9c:b0:78d:ce8b:8548 with SMTP id hs28-20020a1709073e9c00b0078dce8b8548mr12728342ejc.427.1666297404150; Thu, 20 Oct 2022 13:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666297404; cv=none; d=google.com; s=arc-20160816; b=jCoHi93rLGqDiryV9cbgVQfljReSE3Dg70fZ1/TxZRfjtLr21VH0LxpRsA0XhCXFsq lS1hKhNWoG8cs29Q6JJ6hbUNXPtADhQBu+8V8FvBhL2sqw7MqqDOypvK2TVziEVF5a8a 3b11TbZws3Bhwa4Beq4fq641vIQ7O56pKEA/6E/Hpdqw/faNaaFbnHv4VSGQc3evJF4i OY77KnymQzn5LKtompVPOvYzyXqE8aXHSYUvZCyQ/Bf7OaLpm5arohxhKHWWP56019E1 Fw4LRMf4JnYmarJyvChKUjTCgS+HbXpBE1oqrXck0ZkEMDXXsuW9tccLKhiK9f3oiDDd i7tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FSU5vZGhDL5YE71yQgT2MCPFUtVB8F01lbEJpFp9jbA=; b=lC9od9xNl4aNCGsVS3q3NmMTfU2ZtobEDhcBkHaRy+x+Igypi259+mKAcHb3tIHCC+ UImyAm82+y5fgnisSN85+sBrUphOy9TZKLDjkd8j/IQTXJYAwsZ6OrgobcdyoLDAhuxZ ILVN9BZJNgYiy7q7mjD0++ZJvACHkfPRgXXu1neUQGdzskqlt5IPb1c6/8SSxMgtcwom f0IsMnK0WhjUkyj2fOvCFzA2YjqXPANKaaJJScy43UWz0CoU/ph0I/IaEzpiWJvORe9h Zhe7/dsKL++3Z1rdisQN5X3eEhij8mqANEoC0dMUCUviMukUf2uBnyrt8lw9h5DhiuKo LxGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6F9AqN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cn4-20020a0564020ca400b0045c4b1f4315si16204216edb.485.2022.10.20.13.22.56; Thu, 20 Oct 2022 13:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6F9AqN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbiJTUE1 (ORCPT + 99 others); Thu, 20 Oct 2022 16:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbiJTUEZ (ORCPT ); Thu, 20 Oct 2022 16:04:25 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6C89218A for ; Thu, 20 Oct 2022 13:04:21 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id g10so841894oif.10 for ; Thu, 20 Oct 2022 13:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FSU5vZGhDL5YE71yQgT2MCPFUtVB8F01lbEJpFp9jbA=; b=Q6F9AqN3FN/RTaVkWHIa3ScXqM05Qtup60Em3+Rz76spzTfg1C/MkzL+NIqHGDcf01 0rJD8BSjrTMbwQsIgE2MiB+iNrdYDZQPqx841hNZiy/cVA67zPIy+VDYXlFKczVxMa6n 57I5om8tS3qGSUKHTS+b9ZQR39LzbPJcBqCF+FRd8girnE1rnxeza9cVL1/otV0DkmU3 udLrdRHUVrMJvbQiyweKSeUX0QOn27QdsS0+gp1K7UD75yt5Th+A/aEJzDAxOV62uXG4 dTMwBhY4Kpt4QHC9CuAEfebfF53/FkCRTRG4eJAFnlGWIr3CF30sDs6ZXWTLZbKNskG7 rqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FSU5vZGhDL5YE71yQgT2MCPFUtVB8F01lbEJpFp9jbA=; b=I9krPjFn6/vjdqVRqjHVRxxuMjtKDljuH1ySZZHWcZYJINq4VUFjx/WhJv/T3QIlcF danVOFiFYFYW/Bx9MNggfRLk12fhNzla471Bjp3JuuVOR6jDz9aSiUxoU6TmK1qQY7KH DsQm4D1vqrI2qZGfJIG+I2iCJFF1qMGjKZHxYWZ1KitTfJnTb3af2OjSVSkpgForxo2H a6NmcXT+/Z5ASy+bItQOTEvyCHJpTCJFBpc5nADtUmMDeW6JRcagV8GVKesxd+8xaMZk uzGwfli0OBM0qHoijqghNPASFypg+rwTczrqm6V+Z0lbLNRWWIlh+mLlnlI0/P17s+Ot /TtQ== X-Gm-Message-State: ACrzQf0BGz7++Y9CZ/s7JwM9PQSXxJ34UEPP3FgAINZLSHWBHro7pHJ7 amflzJq4N/wp3k2xzUr+ZJE= X-Received: by 2002:a05:6808:138e:b0:355:2b42:1580 with SMTP id c14-20020a056808138e00b003552b421580mr14067581oiw.91.1666296260944; Thu, 20 Oct 2022 13:04:20 -0700 (PDT) Received: from localhost ([12.97.180.36]) by smtp.gmail.com with ESMTPSA id 22-20020a544196000000b00354978180d8sm337695oiy.22.2022.10.20.13.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 13:04:20 -0700 (PDT) Date: Thu, 20 Oct 2022 13:02:07 -0700 From: Yury Norov To: "Russell King (Oracle)" Cc: Catalin Marinas , Mark Rutland , Will Deacon , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , Alexey Klimov , Andy Shevchenko , Andy Whitcroft , Dennis Zhou , Geert Uytterhoeven , Guenter Roeck , Kees Cook , Linus Torvalds , Rasmus Villemoes Subject: Re: [RFC PATCH 0/2] Switch ARM to generic find_bit() API Message-ID: References: <20221020032024.1804535-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 20, 2022 at 05:51:34PM +0100, Russell King (Oracle) wrote: > On Wed, Oct 19, 2022 at 08:20:22PM -0700, Yury Norov wrote: > > Hi Russell, all, > > > > I'd like to respin a patch that switches ARM to generic find_bit() > > functions. > > > > Generic code works on par with arch or better, according to my > > testing [1], and with recent improvements merged in v6.1, it should > > be even faster. > > > > ARM already uses many generic find_bit() functions - those that it > > doesn't implement. So we are talking about migrating a subset of the > > API; most of find_bit() family has only generic implementation on ARM. > > > > The only concern about this migration is that ARM code supports > > byte-aligned bitmap addresses, while generic code is optimized for > > word-aligned bitmaps. > > > > In my practice, I've never seen unaligned bitmaps. But to check that on > > ARM, I added a run-time check for bitmap alignment. I gave it run on > > several architectures and found nothing. > > > > Can you please check that on your hardware and compare performance of > > generic vs arch code for you? If everything is OK, I suggest switching > > ARM to generic find_bit() completely. > > > > Thanks, > > Yury > > > > [1] https://lore.kernel.org/all/YuWk3titnOiQACzC@yury-laptop/ > > I _really_ don't want to play around with this stuff right now... 6.0 > appears to have a regression on arm32 early on during boot: > > [ 1.410115] EXT4-fs error (device sda1): htree_dirblock_to_tree:1093: inode #256: block 8797: comm systemd: bad entry in directory: rec_len % 4 != 0 - offset=0, inode=33188, rec_len=35097, size=4096 fake=0 > > Booting 5.19 with the same filesystem works without issue and without > even a fsck, but booting 6.0 always results in some problem that > prevents it booting. > > Debugging this is not easy, because there also seems to be something > up with the bloody serial console - sometimes I get nothing, other > times I get nothing more than: > > [ 2.929502] EXT4-fs error (de > > and then the output stops. Is the console no longer synchronous? If it > isn't, that's a huge mistake which can be seen right here with the > partial message output... so I also need to work out how to make the > console output synchronous again. Got it. I you think that EXT4 problems are due to unaligned bitmaps, you can take 1st patch from this series to check. Thanks, Yury