Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1324379lqd; Thu, 25 Apr 2024 11:55:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPSvtEKtNasSqvmYtPjDHIIxoQrP+fTqTbAaRDzP/P34qGkgiWpMxY7WMDl1Ct6RYzh8b+MtE1SDdFo0E4ldQk0hsR6Q5j/R2ZbcE+bA== X-Google-Smtp-Source: AGHT+IFhQ/a8GVJl9CV4yFGAudRhyWc2hEQDCXPufot86Lp8q73VSrT3Awm7VIbsMxrY+65TLOWH X-Received: by 2002:a17:906:3b0f:b0:a55:b3d8:a0c8 with SMTP id g15-20020a1709063b0f00b00a55b3d8a0c8mr420695ejf.42.1714071315845; Thu, 25 Apr 2024 11:55:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714071315; cv=pass; d=google.com; s=arc-20160816; b=ao58Dtzu2lJT/K+CF4DtAxVUf6vuvEvR3Wy2nqChf3fjJVrdiZjRzIauHpX/3yhUki SPLsLTfSVRNRAYdz0qr2WoyqvybJC3QlZSC3gvkbQiaq5begjRx9vfNixp+MphdUTfce vyaXk+/xa+vuO/SWGMg0PnaXjkLeAsesIxYjHWqXILdrmMwaM4OqIZlPwewTvAtO4Lsk mvhdFZwZUdACZFhYIWNH19fnuduvR+atESKTbz7vvjUiv5NQOSS8/hdS6ap/OZW8xHtl 9gDjEMAENJJcPeNeeVjQ7DMgdTP9G258UARVIX5uLo18sZ4wLgIlsYmMRhen1W4L3p2i QnZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oyktM7E7M+KuWF5/aH7rtY519Fb1ZAYOKfjC4XC5Z9w=; fh=px0tNHw6eUEfzMI5bLu9D7tHfIxcun0IB5yAxkWPzCc=; b=cDoeCCZubmOqerkDCACEj5RqP7mg/6waA4J7Su20aws8UywECWcWE70rh0CohnKBpL 5iIqlleCxRL/z0Bqb/FTzuIWQMU6CsonGNcMsxEtFbKGk0hOo6mKc9wvZW4x8qC5w9sW 9fnziVc64k8d+8GzkADcjTlZ72XWsKHhv6DEF52EUDo4ysIjL6I1ceX+BklcA+JLHPhJ w/rco6c/egCkrDa9DXFK5gMr6DUusg8OgC6ceoGp3eFiUujDJmLpqJP0gPuMBYLn8GNc 99rTKXj5X/j7Fhbyn9S0Bob4RUGrKLZpBln7WJZivYpvy24zzfEURWg7TiwDQyqzBnCo 4MWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Jxve/Ywx"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-159038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159038-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o16-20020a1709064f9000b00a5218e6bd58si10166733eju.41.2024.04.25.11.55.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 11:55:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Jxve/Ywx"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-159038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159038-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 92CA21F232F7 for ; Thu, 25 Apr 2024 18:55:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75BE11514E7; Thu, 25 Apr 2024 18:54:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Jxve/Ywx" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9480B14D717; Thu, 25 Apr 2024 18:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071250; cv=none; b=pw5d/U4B7Xm94q0ju7Dp1KJEVuJQNTwIhx238oc6o0PO9aVk3n1XQjD+Bn7PqyMLHbTcIssBDe+RP6bedHG2qYo+DE2e+Rt3YlZGBQmPH+nvJS42doyAHyPbBMoCRKuls0LVdE979zHYO9cUfjlyrHs6mLtkNwJjH4PHgb1VRHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071250; c=relaxed/simple; bh=EmD01qjkuxsGFRwgYYLCHqdE8rYkUVWUDM7DxHmc0AU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vFDOoJQ4IfNMt3rGUTJ1IpPAKIyFoyPSuF7+aWi6ADY7w5BrMX0Q9OLhy76/8tRzl4tkZpQsUs8BcTYJe2sU0U3Y5z/5FcdoQEa+FyILWy+kmcJg2Atsuub7sTxVbkXArL/MTlgp755lpZwARQDszn8Q2aiCZxjIvUzE6pAcc+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Jxve/Ywx; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=oyktM7E7M+KuWF5/aH7rtY519Fb1ZAYOKfjC4XC5Z9w=; b=Jxve/YwxL+dQtqIlLtYdKWLJMs UbHt8PJvUuKGgFbyB3H/5NK/iatBxYjqomlid8oQOKtjGb/7lMi/9+lVr06WliZh0NZyxuEalolj4 vyNiKjVObuqv2rnIgkltCLSW29eDwOXj5WiF+di6I1l0zKXkRkt6SbG8OqH6+NCnCtxQMd9ZLPXNg ov2w1wl4w5UwEqDCzwWnAYQrrNeYzO6BDIAiN/tuRCVA/yuz1EEKLRpk6xav/3RT81EL3RmVvwAgF kNBk9P0Y7DcOxH1NZPnqVX+0LNpHA1jrI7WovPoDfiyCwIPnEKRyzRIoKDgJTy55B+TnC6F/ATIlt pPpvhqJg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s04EG-00000003apA-0XsP; Thu, 25 Apr 2024 18:53:56 +0000 Date: Thu, 25 Apr 2024 19:53:56 +0100 From: Matthew Wilcox To: "Pankaj Raghav (Samsung)" Cc: djwong@kernel.org, brauner@kernel.org, david@fromorbit.com, chandan.babu@oracle.com, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, hare@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, mcgrof@kernel.org, gost.dev@samsung.com, p.raghav@samsung.com Subject: Re: [PATCH v4 04/11] readahead: allocate folios with mapping_min_order in readahead Message-ID: References: <20240425113746.335530-1-kernel@pankajraghav.com> <20240425113746.335530-5-kernel@pankajraghav.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240425113746.335530-5-kernel@pankajraghav.com> On Thu, Apr 25, 2024 at 01:37:39PM +0200, Pankaj Raghav (Samsung) wrote: > + unsigned long index = readahead_index(ractl), ra_folio_index; This is confusing. Uninitialised variables should go before initialised ones. So either: unsigned long ra_folio_index, index = readahead_index(ractl); or unsigned long index = readahead_index(ractl); unsigned long ra_folio_index; > + unsigned long i = 0, mark; ditto