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 F2A31C54EE9 for ; Tue, 20 Sep 2022 01:46:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BDE994000A; Mon, 19 Sep 2022 21:46:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76C7A940007; Mon, 19 Sep 2022 21:46:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6345F94000A; Mon, 19 Sep 2022 21:46:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 54435940007 for ; Mon, 19 Sep 2022 21:46:06 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2D2BA120BE7 for ; Tue, 20 Sep 2022 01:46:06 +0000 (UTC) X-FDA: 79930773132.11.64906AE Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf14.hostedemail.com (Postfix) with ESMTP id D9E2A10000B for ; Tue, 20 Sep 2022 01:46:05 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id x27so1486247lfu.0 for ; Mon, 19 Sep 2022 18:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=SiROIzHdLfdD7MXkY/PQu07S3gAEb3MJz3ltBVhCFts=; b=FuGPRnmnGnWAfxVFOhTFaINj5IEF45tiLxl4GJjvtCqJREqPIZoy2MXft7Eh9FqxcK 7AWd7UNeKebDzDfcgKtmklu87k8UDVzyWo1IgiUzixekxKgLvSA7bVoDcmf2Aa52f9Dk 3/CjTbk1g2abyKsDkACF54Ik1xrRIsZx5myEDh779eiftW1ztbE0K3+2U2GhQQHLUFF3 2Y0EkmaH+Ks4GgPXwa9X8BR1MihiR8IUUjWQYIqmaqHJPXYCt2o7MlwhRmismjWf1/aP /igFLJN/MsEQSa1wUFGlZ6efUF9kwMnBgCcWW4cmyARlDtFrMT2Umtbh4d/sRGh5gf0t 1dEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=SiROIzHdLfdD7MXkY/PQu07S3gAEb3MJz3ltBVhCFts=; b=xI/OOBFy0NTSChsbrxZFpnv4mSYEPDHb/sDejAo4MM81vo9Wkf63MSME1d4n8g+rfI h0un8+j6kHXVwlqDSiJhDvh1O7vv3NKAUzmGdwH1jeXC7wffOYeDFpEd1oyBFrpnLbQP dWM6AQvUzE7WdDgKqc10YTisSEWUbv/yD8N/DgsillF0lc8zdgfKExO4mpIM3HqWvLHC XlyJqZ7VcoexmymSAe1Dyk+3BfJlzRCSVIdBTwaPXbrbe4bwFyt5RUGxZfgb/xH2jT0q IZdCfxLEXsZAQQHJwyD/umQ+UkLKx1wvG7Ui9nKEYDeMbXWY2+oilml+AEbsK0Ijw7gu pNyw== X-Gm-Message-State: ACrzQf3HyG9wyEZbiLwPS8iZpFC0DkTJXie+Rw5nuBu1FtKenk3d7Nl1 FJ3nw869bwHqE10+1XoUPz3A4H0IEGFTl1MdQtY= X-Google-Smtp-Source: AMsMyM4+mvkBq1ml2Ucbtd0poKJ629xI1B25b9Jj50XgMwBW7hrZio/+hObBH9+I8W1/iDPNKDoWNxf7xEZeLmlewgw= X-Received: by 2002:a05:6512:2242:b0:49d:7f0e:eb4b with SMTP id i2-20020a056512224200b0049d7f0eeb4bmr6860772lfu.128.1663638364151; Mon, 19 Sep 2022 18:46:04 -0700 (PDT) MIME-Version: 1.0 References: <1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com> <20220919101629.xlafi2y2dk357wk3@techsingularity.net> In-Reply-To: <20220919101629.xlafi2y2dk357wk3@techsingularity.net> From: Zhaoyang Huang Date: Tue, 20 Sep 2022 09:45:35 +0800 Message-ID: Subject: Re: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail To: Mel Gorman Cc: "zhaoyang.huang" , Andrew Morton , "open list:MEMORY MANAGEMENT" , LKML , Ke Wang Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663638365; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SiROIzHdLfdD7MXkY/PQu07S3gAEb3MJz3ltBVhCFts=; b=JtCfzociwQpZoY7X5ojT1TO0j1q37+xZYRwqfligTxkYDNhPkoy3E/6ffnOsn0Ow9gke0X KUBXNxg+xI0tDWmFcIp4sUvfD9yl0HUYuZU5r1CLXRpkdPwo9qflU4j5WaF3DWw93nqeKi QAgGaTJi7mWZR9yGpHrumexGS2Wb2A8= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FuGPRnmn; spf=pass (imf14.hostedemail.com: domain of huangzhaoyang@gmail.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=huangzhaoyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663638365; a=rsa-sha256; cv=none; b=2jjC5WnttC4AL8rDSiYcJ1lB1p28dw9iWi4cQT3IhqwYfL9NcT+irM6DB7opFWbKyODQf+ 3DTF3p3O0Y+4xElL4lI2HFrbPqDGkxuwo03LwdphBULzOYLWGxbk1oZ5oziBoFHH2MORfl yMiDB5nDJ5LuBNUIYXO7kjlYwvSmt8U= X-Stat-Signature: cxzab5rsuf575ir14rccgndyggqkfwdy X-Rspam-User: X-Rspamd-Queue-Id: D9E2A10000B X-Rspamd-Server: rspam02 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FuGPRnmn; spf=pass (imf14.hostedemail.com: domain of huangzhaoyang@gmail.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=huangzhaoyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1663638365-931428 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 Mon, Sep 19, 2022 at 6:22 PM Mel Gorman wrote: > > On Fri, Sep 16, 2022 at 06:58:12PM +0800, zhaoyang.huang wrote: > > From: Zhaoyang Huang > > > > Check the global free list again even if rmqueue_bulk failed for pcp pages when > > there is ongoing reclaiming, which could eliminate potential direct reclaim by > > chance. > > > > Signed-off-by: Zhaoyang Huang > > Patch does not apply and may be based on a custom kernel that introduced > a problem. There is no description of what problem this is trying to > fix. Checking the status of reclaim for a specific zone in this path would > be a little unexpected. If allocation pressure is exceeding the ability > of reclaim to make progress then the caller likely needs to take action > like direct reclaim. If the allocation failure is due to a high-order > failure then it may need to enter direct compaction etc. Agree with the above comment. This is a proposal aiming at avoiding direct reclaiming things with minimum cost, that is to say, about 5 CPU instructions in return with the overhead of function calls which has both of several loops inside and potential throttle sleep by IO congestion etc. > > -- > Mel Gorman > SUSE Labs