Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3570321pxk; Mon, 28 Sep 2020 23:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvl8j6pFQXYTJDKkhsiDsNHzN0fZzWTXe5eHJQDH0jo41Iydbr+BFO0hdu/JZCQRhLIWxl X-Received: by 2002:aa7:d043:: with SMTP id n3mr1553827edo.243.1601362081962; Mon, 28 Sep 2020 23:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601362081; cv=none; d=google.com; s=arc-20160816; b=pnLKvXZ7aDbpMfOf4ljI8KQxYdqlJfWMY1DsQeDE+HcpdE3ZFBKaMRnC2bs/RuQOqk ty5J/mHyn9EMQdXxWTMypow90CEvBdP+9Ce6fkFZ8+/i8/VkgqIdtWKlRyn1Gw9PYYJr /EaVDPyG1dNnLcdFNAge962wqOSD4CIF+VIFqztTbzbjyEuiY7wsrc4amRyyfseuFKvA +faP8qHfN/Ob23fz37tDBNx7LEGpi06W9q3ypvgvh798ZkUNQp0uYZHcmPFGcGS1I04l E95oNGW6xzuQfkvPXmUNoMgjIbv0C7YINW+9svlZy6zD8CoypqcdPKFPULw88Tx47DKt 0Whg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xEac7XYS7Ngt5MwOzy7ceKxpo4W5ekfGGC6+CP++DZg=; b=revW1xgJy9RnhQsunXvC360Ek/tMiNC9qQ8AcMXpvCG8D/QYtZBnQTFNUz4m2G3du8 fFbvAJaYFmgjdTxKcdvEPqmq+cam0Im4aU0QfMTPiIM3fgo+LGRb06xPmlvG02/Xc7ka 1VxLul7Ts5QJ0vdDRfgOa0VnvYtP01q8C+z2Y3Cgrnn/W/fFjw971qYIivTZWCuqX1hd 7wqgoxHYtHNUKq9pYMf/2ns3+DqHl4392E9eD8njJOiUFJPa0qIF7981FYNf/toIBHJd HiSKAEs61W39maoA+eMNtJxvOeKJcZ4JexIqI12XFZsgvXG/vE/50jeiKZHDa9yJyepo i44A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BXGARTTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si2122739eju.83.2020.09.28.23.47.38; Mon, 28 Sep 2020 23:48:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BXGARTTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725536AbgI2GqP (ORCPT + 99 others); Tue, 29 Sep 2020 02:46:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgI2GqP (ORCPT ); Tue, 29 Sep 2020 02:46:15 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04324C061755 for ; Mon, 28 Sep 2020 23:46:15 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id a4so2755712qth.0 for ; Mon, 28 Sep 2020 23:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=xEac7XYS7Ngt5MwOzy7ceKxpo4W5ekfGGC6+CP++DZg=; b=BXGARTTNhnDvN6+yx8fUbNfRk6oCA4PsGy8TrokK4PiImB02C9EbjuOTny9seKeMjX eh3Lt/1EuPp1XV16cUlcOntWTn5Y/u/KHjZrFIkliWL8KCRqKuz6e/XU5rHWZ6o/Dsl7 iCGSgbmbHTMQ6n7NLTcleeNAEPxLZF1rVKVwMc1e8jeRfz4J1px72BDqpjrUSs1eSgRy nQA4WRgpYerKwSPL6D540VcDbyFMVN+IcNLokiB5eM3tihyTrDA5oHOTfSlPXZCIWX8i hJ0nrzXAaotnB1/1hQ3JRQBQaTDN0ze5cILwjzbSih1K5g8pKcZHng8udycm5FnP6ciK 0bCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xEac7XYS7Ngt5MwOzy7ceKxpo4W5ekfGGC6+CP++DZg=; b=AbnP3rJVLqM9NTL59d708C0s+WulmFgs1ZnG9O6B+QSpCRHHzWnBVnYZggOY4MMN94 E28sV6RtdGob0xaIJWI3OczQJkyc28VkLKwZSZb9KJCLfHTu0SYZYD7Kcst+Umsl39IT QzPIzBaWrxyK9e060+Jyse/uZ29yKTzyBKScQeyBLPYBhUSGMv7AgYzUK/GsogoYt3wT CWm8PvnwVWtRw1/wwdl6qqLBrni0L9BmU6Ahn46+E80RcUInCscGIqGgxoZiBCqqTRch CG2QxAQ2Oj0zhsaK8UnCZJgaqSdhCqJzqDzoqrWXLXttuEBrRqtYU2YjczsR3V0BRcU1 TVxQ== X-Gm-Message-State: AOAM532te2Scwz25dp3ZRorTt1VjwOkMQ/2IanHl5HYvrl8E2p9AnhJX kOQF6Qafmr8JtHRdJ2GXX3crPXOpgFTdFSTXkd7keG4UQ4s= X-Received: by 2002:ac8:44b5:: with SMTP id a21mr1866068qto.36.1601361974096; Mon, 28 Sep 2020 23:46:14 -0700 (PDT) MIME-Version: 1.0 References: <1601283046-15329-1-git-send-email-iamjoonsoo.kim@lge.com> <20200928165215.f46924bfff9a109131048f81@linux-foundation.org> <20200928215055.02ff9b3ff5e0c392b2403411@linux-foundation.org> In-Reply-To: <20200928215055.02ff9b3ff5e0c392b2403411@linux-foundation.org> From: Joonsoo Kim Date: Tue, 29 Sep 2020 15:46:02 +0900 Message-ID: Subject: Re: [PATCH v2 for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs To: Andrew Morton Cc: Linux Memory Management List , LKML , Michal Hocko , Vlastimil Babka , "Aneesh Kumar K . V" , Mel Gorman , kernel-team@lge.com, Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020=EB=85=84 9=EC=9B=94 29=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 1:50, A= ndrew Morton =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84= =B1: > > On Tue, 29 Sep 2020 10:28:05 +0900 Joonsoo Kim wrote: > > > > What about manually emptying the pcplists beforehand? > > > > It also increases the probability. schedule() or interrupt after emptyi= ng but > > before the allocation could invalidate the effect. > > Keep local interrupts disabled across the pcp drain and the allocation > attempt. As said before, it's an allocation context API and actual allocation happens later. Doing such things there is not an easy job. > > > Or byassing the pcplists for this caller and calling __rmqueue() dire= ctly? > > > > What this patch does is this one. > > I meant via a different function rather than by adding overhead to the > existing commonly-used function. Got it. One idea could be disabling/enabling pcp list on these APIs but it's overhead would not be appropriate on these APIs. I don't have another idea that doesn't touch the allocation path. Thanks.