Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1745372pxp; Mon, 7 Mar 2022 01:14:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOLwQgS56q51qX5CLmGkYhISYdS2BNwC+tzIuFlELNSqOs9ItAIS1riHMo+5jSGY8O3eJp X-Received: by 2002:a17:907:6e89:b0:6da:8f43:f0c6 with SMTP id sh9-20020a1709076e8900b006da8f43f0c6mr8345208ejc.429.1646644444884; Mon, 07 Mar 2022 01:14:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646644444; cv=none; d=google.com; s=arc-20160816; b=IOtbi9GfzuE/YP8/3EWlhgDPEfsxtKuXjcW9NrtejH6EwXFkMuv55uGMj8GlBAtPFl GHnLNd93zwLTkNCDgWqrJ7NoqmX2tPSzP04FYpWAfoo3anpgoIDAdpzzAB9UiihOg7hs HswhJ1xS3ZPGcYLKLxpV6Ng22ot547s8LxOxhp+CqACdzOnblg3YY4h15iaX4/0OuzvH yMraICPb++OUc6yXfYKLaMOW7Z2Y6v2WNE9r6z99f5TGpmJWzP2lb07T7R/Vb905y9zA czBYF4CLDBx0FRlKM4AWhJwk7KFu0TA0XUwPp3gmP+QhiOK+2V72eK+rx+JexxQINTjF 3GqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=ZnCO4VEyQ6MwaUeB1Tr92HuZA8awyHJ0b7AAC7CRWU4=; b=b1ixVKfZ43WdtPD6pUAxi2MnrqoyEGKgOLqPrCKglGjjyqXtHzQ0LL+W3xHf0hTd5M R5mGiHDtvddgTiOLPy+TMFzdGrF55oadGwc23ZE1Qh3xgYq3jdKprV18MuHsWIUkY2ep b1e32D98qKGXwAFEDoiwNU2XSbvPDGIMhslqQDHFhHy/Hch6p+7vC8kPkVRW9DgtUvxx T/pQTWuNNvZ8Daj+LXcZA3lSK9I8JIy8LD+us4I4Jt9qxV5H10slO62JYWWco3J0aeIs YLg84V9yZ3NkAgR/Rl/C6acGB2E7EfZxQ2+ZAUdNUN7o9YFYd7wJmvah+mAPW9sJETdP dX1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W7gI3CAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a5-20020a170906274500b006d1c4f7f7c3si7287400ejd.924.2022.03.07.01.13.41; Mon, 07 Mar 2022 01:14:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W7gI3CAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235892AbiCGHnv (ORCPT + 99 others); Mon, 7 Mar 2022 02:43:51 -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 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.