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 21214C433F5 for ; Mon, 7 Mar 2022 07:42:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD16E8D0002; Mon, 7 Mar 2022 02:42:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B5A858D0001; Mon, 7 Mar 2022 02:42:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FB958D0002; Mon, 7 Mar 2022 02:42:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 9208B8D0001 for ; Mon, 7 Mar 2022 02:42:58 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 69FA923E62 for ; Mon, 7 Mar 2022 07:42:58 +0000 (UTC) X-FDA: 79216798836.10.AE75BA4 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf30.hostedemail.com (Postfix) with ESMTP id 4399780004 for ; Mon, 7 Mar 2022 07:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646638977; x=1678174977; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=xGo0CJRvzx+mTrNlJbZeUJJRYAUz9l3q4pCLsrKvBig=; b=ilJqGA3/bWnZw0t1ffm5TcJW0bSrmfVIgSyynyD1LeXRA12P8ylur4fe LAxuefHLGnliJ8BKsOWbA8DTZ2CVgbaTy5f/whvsQcjQvfboyJurBhDRy lYYQ4zF68bBfWAAXQT0STDbxzrLoztqdBcibEuQekYL6hmiZtzumHFa0F auLuq8en+cn81ienAOYz11Jq+gGmKu6gHkMWuz+x8kg358Xxmkg6hlKxo 0PZl3D8+KQ0eWKLF7Llzx4H78ZYzBgTP+zT3NATyhvyl4ykPNBoZrIA0Z 1q0uSnYS7W3SqK1SsIqEA1uQGOPCWHYpy8mfqLpFhteiO8VMvdnfP4cL7 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="241756876" X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="241756876" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 23:42:56 -0800 X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="494970498" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.13.94]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 23:42:50 -0800 From: "Huang, Ying" To: Muchun Song Cc: Miaohe Lin , Andrew Morton , Mike Kravetz , Yang Shi , Matthew Wilcox , Zi Yan , Minchan Kim , Alistair Popple , ave.hansen@linux.intel.com, o451686892@gmail.com, Mina Almasry , John Hubbard , Ralph Campbell , Peter Xu , =?utf-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggA==?= =?utf-8?B?5Y+jIOebtOS5nyk=?= , Michal Hocko , riel@redhat.com, Linux Memory Management List , LKML Subject: Re: [PATCH 15/16] mm/migration: fix possible do_pages_stat_array racing with memory offline References: <20220304093409.25829-1-linmiaohe@huawei.com> <20220304093409.25829-16-linmiaohe@huawei.com> <875yoq5od4.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Mon, 07 Mar 2022 15:42:43 +0800 In-Reply-To: (Muchun Song's message of "Mon, 7 Mar 2022 15:01:12 +0800") Message-ID: <87r17emcng.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Queue-Id: 4399780004 X-Stat-Signature: y1wihi4dm4nx3sdujeo8t4gordpgrckp X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="ilJqGA3/"; spf=none (imf30.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.20) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam07 X-HE-Tag: 1646638977-97655 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: Muchun Song writes: > On Mon, Mar 7, 2022 at 1:22 PM Huang, Ying wrote: >> >> Miaohe Lin writes: >> >> > When follow_page peeks a page, the page could be reclaimed under heavy >> > memory pressure >> >> I don't think that memory pressure and reclaiming will be an issue. > > I think he means a page first to be reclaimed then to be offline > could encounter this issue and reclaiming is a precondition. I don't think reclaiming is a precondition. It seems possible that the virtual page is migrated, then the physical page is offlined. Best Regards, Huang, Ying > Thanks. > >> >> > and thus be offlined while it's still being used by the >> > do_pages_stat_array(). >> >> "offline" seems a possible problem.