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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DA9DC48BF6 for ; Mon, 4 Mar 2024 15:36:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F03226B0072; Mon, 4 Mar 2024 10:36:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB3256B0075; Mon, 4 Mar 2024 10:36:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7A2C6B0078; Mon, 4 Mar 2024 10:36:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C2ED16B0072 for ; Mon, 4 Mar 2024 10:36:49 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 694ED1A0C25 for ; Mon, 4 Mar 2024 15:36:49 +0000 (UTC) X-FDA: 81859759338.19.A0C10F4 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by imf09.hostedemail.com (Postfix) with ESMTP id 9D7EB14002E for ; Mon, 4 Mar 2024 15:36:47 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=XZ213hoq; spf=pass (imf09.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.171 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709566608; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FOKwtz1OnhAxtbDBuKtXT/Xq4RMrHi4ST4yvlFkJb6g=; b=kaVqvXPM6sCIQG9GcHtfa9m1EpTi0l+7+TcY7McUwE0qSYk9RFenw+DFUqjm9oceGFKq64 pfaLzIwk8Ek7TmoL051dAsQCaJONiRg+T3N+blHW0LQ/cgrzQRa/YWS07IDtoiNY4zIqcv XsJWvBJsVSs6RqK/qb4lzbEd1buaYZM= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=XZ213hoq; spf=pass (imf09.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.171 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709566608; a=rsa-sha256; cv=none; b=V7A0z5WWFo0so+y5g+L7laTeUYPZQq/R7F80gMravTX/1xQBAPiAmYkA0JUm5VIViqYQI/ 78ChQ0pDb6Ji3gsy689TYuyBQ5ZD/P2zshzOVMsW8LGAij8KX0pW7b3x8Jto1SKd07+IUo 2GCkZaELo5+glwLFnXIfAhU09odFmHA= Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4TpN8p4q7Hz9tYJ; Mon, 4 Mar 2024 16:36:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1709566602; 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=FOKwtz1OnhAxtbDBuKtXT/Xq4RMrHi4ST4yvlFkJb6g=; b=XZ213hoq4xNhbJ19fxAiIm/ZtWfY3ZX1T/O9/2/Ay1pSrdChz8dUXG/AtOfjGdeat5jUtM Do7WVRj1j03L4mGyucjrLhQw+ECx47fs23dV1ZEkD+hquLfaRdbcnzX8NH7YsFnivM9e99 QOFFPeuEGMvpzKunQZ+J8fTwnxPu41I3Zdi8oPf4Rw7+gPdEPrIW0DBLgAi8zAVIpCuA6m cCk8r1R3THOPf8RMrYg4/h/lz7Fzk8jkjjABH+jvkIiOJV9sgxYCaFZzoS7HOTjmb0Htf4 gP/oRdR9nNXp7xHWfxLr2shVCvljt0tkeOZtFepA866Vd+HiqV8AU1oZZ/BUIQ== Date: Mon, 4 Mar 2024 16:36:34 +0100 From: "Pankaj Raghav (Samsung)" To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, djwong@kernel.org, mcgrof@kernel.org, linux-mm@kvack.org, hare@suse.de, david@fromorbit.com, akpm@linux-foundation.org, gost.dev@samsung.com, linux-kernel@vger.kernel.org, chandan.babu@oracle.com, Pankaj Raghav Subject: Re: [PATCH v2 03/13] filemap: align the index to mapping_min_order in the page cache Message-ID: References: <20240301164444.3799288-1-kernel@pankajraghav.com> <20240301164444.3799288-4-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 9D7EB14002E X-Rspam-User: X-Stat-Signature: 3i9madbbq1se5owt3kbaszgqfdsj3hdh X-Rspamd-Server: rspam01 X-HE-Tag: 1709566607-371954 X-HE-Meta: U2FsdGVkX1+M8h/XiSV80+8XqOgry5JCtqBi59rKEuO28jH7YyBldBhnoFmLCUTE/VxrtNfkKHndNUw0+Ir8ENMgjvaJ+qvH50sxmoBU8e1S1BDHXN3KPTNduk3WBBC5llHd5CG+JwW0jjb8YitmphwSnnwABYJu2BYwVyvzCapNaSWJYjf7022OMxFKcKR5a6X0eeaMF8n3l/6lwzO7u54gOW3NB5nx+wAHx83LE2WlYLXUztiedNGDyYDosA0mXPxHunvPcEo26tVdYLQLxxPXPVR4YxqHAlkW4eiIMZmFVFepH7kyP5e3yv8pAFDK7AvyEpg3L2FhbbFNpFvlpnP9s3fWm8cfn39zIuWhE/7ouU34s8UG597SqaReCucxIUJkE2qXvgFsMQlvgCn449mSUG1/JwxmASXU7vwz8rYvQvsZK4FN3asHnaFDLvzal7i0AXd91ARHIpfDU1iWsAWT4s3Wec+/j0PAL36gwl2XqNwapsu2bU7ATCkl1nLO//oz+n3Xpd4qWlHoK37kRpqgzbKZS2QzN8lLq5p1u5FJvnuqOtSN/S9Tv4ZgnxweCTMV1p8tZgUy2HGqu5bCfeTrJp1xAC7LfxaRAElk++PdN3DdsSVmtZ3XBbM9eV5Z6xY4PoQ9ygeF7aGCtNS4IXGTT/diZLV4uGlCdD4kBlAkFs/YMge5ZRqAfAnG5z6H0Ix3le4WuBxsH6Y1ICcwQ7WHdJ//bUTB5lcQaf0kVwAh39bL/+4c2wCfLy7g28ksVovCtfpSsYDr4ApUaABcJPXdwo36B/a1iavTTbnWiOJTqmxosk6gciJTUTDrR4hYAdxMdrRgsjkd37bhMEzQDVIC7kBELzLtspgqDXdxKQUAxGu3o9hqsmHRW5FwohQiOjpk31yZz1+P66HEdmrVxnWX8pJl6mcuoHKaQ/VDi44= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Mar 01, 2024 at 07:26:55PM +0000, Matthew Wilcox wrote: > On Fri, Mar 01, 2024 at 05:44:34PM +0100, Pankaj Raghav (Samsung) wrote: > > +#define DEFINE_READAHEAD_ALIGNED(ractl, f, r, m, i) \ > > + struct readahead_control ractl = { \ > > + .file = f, \ > > + .mapping = m, \ > > + .ra = r, \ > > + ._index = mapping_align_start_index(m, i), \ > > + } > > My point was that you didn't need to do any of this. > Got it. I probably didn't understand your old comment properly. > Look, I've tried to give constructive review, but I feel like I'm going > to have to be blunt. There is no evidence of design or understanding > in these patches or their commit messages. You don't have a coherent > message about "These things have to be aligned; these things can be at > arbitrary alignment". If you have thought about it, it doesn't show. > > Maybe you just need to go back over the patches and read them as a series, > but it feels like "Oh, there's a hole here, patch it; another hole here, > patch it" without thinking about what's going on and why. > > I want to help, but it feels like it'd be easier to do all the work myself > at this point, and that's not good for me, and it's not good for you. > > So, let's start off: Is the index in ractl aligned or not, and why do > you believe that's the right approach? And review each of the patches > in this series with the answer to that question in mind because you are > currently inconsistent. Thanks for the feedback, and I get your comment about inconsistentency, especially in the part where we align the index probably in places where it doesn't even matter. As someone who is a bit new to the inner workings of the page cache, I was a bit unsure about choosing the right abstracation to enforce alignment. I am going through all the patches now based on your feedback and changing the commit messages to clarify the intent. -- Pankaj