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 6EAF0C433F5 for ; Tue, 18 Jan 2022 13:27:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C39336B0072; Tue, 18 Jan 2022 08:27:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE8BA6B0073; Tue, 18 Jan 2022 08:27:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD8776B0074; Tue, 18 Jan 2022 08:27:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 9B7096B0072 for ; Tue, 18 Jan 2022 08:27:48 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5FAF0181E4910 for ; Tue, 18 Jan 2022 13:27:48 +0000 (UTC) X-FDA: 79043485416.18.241AAF8 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 23470180008 for ; Tue, 18 Jan 2022 13:27:46 +0000 (UTC) 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: X-Rspamd-Queue-Id: 23470180008 X-Stat-Signature: qyux58iaxoqwaobrttb1aq4z3fopiwfm Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VRSgdevR; dmarc=none; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam08 X-HE-Tag: 1642512466-481152 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: 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?