Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5698902pxb; Thu, 20 Jan 2022 02:46:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy05+XElETQfEtHuEDT2yVUb2Cdv/jhLLa7NBX8VVCw9yRjUv7MtH5MlD3oRbX9FWghtmYM X-Received: by 2002:a63:905:: with SMTP id 5mr31580561pgj.485.1642675562832; Thu, 20 Jan 2022 02:46:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642675562; cv=none; d=google.com; s=arc-20160816; b=b/UlE0TrAi4KFaPt9xGJfGJhnh2lV4vLb3AXU9gKeZJZhCXZxXadHuiJExKRf6aZCq 2b0t+/8o8+tKkzSfde9JT44lOiUde+G/k9YLtiFxp94hNtc85OEEQ1/uz9czn7Xtj7X1 35j+oy8/fxGJM1qJ08moigljq3qwjoE63ASi65RzMvdxIAUjm+NRlexM67eg1ZJDZ54k Nl72yPOBgERiFf3x4m2WvkuGY+bV6lA+hsyWL05UqYnQZeLYMW+2Clz4FAIfAlzABLz7 FNeemz7HSvRwx7eGBf4kznJmkxlILhVWiOJOw2kDFOwk74JwHY3ev1IfKSr/Ur3wJt6Q BcwA== 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=S8lJ6hT05IScVfaZWCLS3w0gUdsjMZ1JnIANvQPP7fM=; b=fl+/kmxYBtZ/7cKAp47EM8tlCZ/riKPLjEn9KolgW+WgzOvJcsCmkSMesraUjsELL7 AISTZ4Jid+zYp7T2eiLnjHZKijhw4ScKoNXSZ24fz00ShrUVAXMto0B/zdUqpEGp2qtv vrUXM9YaBqxDiihcplggJT7tvAh3IVdZL9E3gK6Yj4OYR3A4RjL6j0CtQ3iCySs02lWV 485F8l3qZvwtsM+hKnpyuT3MO+lD86QdR6Spla3KiBfKbeQpOYhc2AzZO1eKbHtMR1vH asVcY5c7s3i3FR+oQxI6CJJ3CM05eFMEbtuo9cQ13bpF0lQ0p1YB7Llh1xQ//gMIsYey K76A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VRSgdevR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id on1si9906759pjb.46.2022.01.20.02.45.51; Thu, 20 Jan 2022 02:46:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VRSgdevR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238890AbiARN1t (ORCPT + 99 others); Tue, 18 Jan 2022 08:27:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234488AbiARN1s (ORCPT ); Tue, 18 Jan 2022 08:27:48 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9030C061574 for ; Tue, 18 Jan 2022 05:27:47 -0800 (PST) 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=S8lJ6hT05IScVfaZWCLS3w0gUdsjMZ1JnIANvQPP7fM=; b=VRSgdevRxq3XobfoPWZXq+HbFs Ez7ah4iB/NkloIdMlY2A17KMTerGSoXOXw6wT53ihcGl9mS6YVwmysCNrQbzRlFQDwKOFH0AxBG+f 21WggbLVBoBw393fOgwbowfbZZH4mXLONiG1VCtWPPgPzM8+nZIyKc1A3taEjo4n3lTnL2E+UtXSW G1+d6BafPDCeFGdhHavJyb/TVIjp7NjR6rxkGNpW1jZvfb4E262h/bodvAMSkWLYplknftmBHbugc kKWtm7gdkedWDjzhR2VwsAJO1pS1ogtIEDOx3gC7SXxLTX49ax4RdmmkkrMypaPrfb5kjNOJ92cJj eH8pJloA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9oWP-009FJG-Uw; Tue, 18 Jan 2022 13:27:37 +0000 Date: Tue, 18 Jan 2022 13:27:37 +0000 From: Matthew Wilcox To: Charan Teja Kalla Cc: Mark Hemment , hughd@google.com, Andrew Morton , vbabka@suse.cz, rientjes@google.com, mhocko@suse.com, surenb@google.com, shakeelb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Charan Teja Reddy Subject: Re: [PATCH v3 RESEND] mm: shmem: implement POSIX_FADV_[WILL|DONT]NEED for shmem Message-ID: References: <1641488717-13865-1-git-send-email-quic_charante@quicinc.com> <2c66ba2e-1c65-3bdd-b91e-eb8391ec6dbf@quicinc.com> <61212ffd-3505-04d7-5403-932a10d676e7@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 18, 2022 at 05:05:40PM +0530, Charan Teja Kalla wrote: > Hello Matthew, > > > Yes. This should obviously be an xa_for_each() loop. > > In one of your patch[1], where we used xarray iterator, though most of > the entries found requires to call xas_pause() but still endup in using > xas_for_each() rather than xa_for_each(). Then, Should this code be > changed to use xa_for_each()? The documentation also says that "The > xas_for_each() iterator will expand into more inline code than > xa_for_each()." > > [1]https://patchwork.kernel.org/project/linux-mm/patch/20200819184850.24779-4-willy@infradead.org/ How do you know the distribution of swap and non-swap entries in that region of that xarray?