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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 207D2C433EF for ; Mon, 7 Mar 2022 07:43:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235895AbiCGHnw (ORCPT ); Mon, 7 Mar 2022 02:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235872AbiCGHnu (ORCPT ); Mon, 7 Mar 2022 02:43:50 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F1FDC5 for ; Sun, 6 Mar 2022 23:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646638976; x=1678174976; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=xGo0CJRvzx+mTrNlJbZeUJJRYAUz9l3q4pCLsrKvBig=; b=W7gI3CAzGHcElDiD/4U307vRhU0xGvhK4AHPOnIvwd0qyrys2XSwfvUT SY2MsTRCATWNnJKCiBScybnLeU1tWh/UvhmNSkydAchboRNR4VdFx/izu gj+hf3/bzhWjX/S/mQOVITI5eeUIMkplJ3jx+c0OP4jwj04/7gXlnY348 9C9VbVuqi70EbkFc8sqQZXQdCKhMAx64rLETc2YLonBuXZWqy8mBmGFH+ NoSYcHQ9nq/rvYAoDbEAg++NAjxhcKfMGhPEQf9fEEfElByni82iQajP5 6mFp745ZxQEEH8xWdfCb/23meyXMQBVZCghPfDuUvkfIGzTgKidu4/1X9 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="254516282" X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="254516282" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.