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 X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56726C4727D for ; Tue, 29 Sep 2020 04:50:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D57F420897 for ; Tue, 29 Sep 2020 04:50:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sCMA5ZZQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D57F420897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EF1AF8E0001; Tue, 29 Sep 2020 00:50:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA1FB6B005D; Tue, 29 Sep 2020 00:50:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB8358E0001; Tue, 29 Sep 2020 00:50:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id C33226B005C for ; Tue, 29 Sep 2020 00:50:57 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 79396180AD802 for ; Tue, 29 Sep 2020 04:50:57 +0000 (UTC) X-FDA: 77314874154.16.drain47_5e06a0127187 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 4FE7310056D5E for ; Tue, 29 Sep 2020 04:50:57 +0000 (UTC) X-HE-Tag: drain47_5e06a0127187 X-Filterd-Recvd-Size: 2542 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Sep 2020 04:50:56 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85B8C207F7; Tue, 29 Sep 2020 04:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601355055; bh=gV6QEyJxDl+g2byKjvydjtaPQ921rhOyIz0suE2c25k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sCMA5ZZQOAmaVjdHqeK6yhK/tgd6/OZ8p6xiO3FXaqhHXXKFSBJUraJtmLw/h+1+v 7NVLZpHwdpdZYTVxbEKvNdW90Ro0uzGbqllUrO9gmksEhAkYZAAYN9ry4SYwcwhjI/ tM1udPnGxoN0EfCCBV7EWtxiCfMrjeVecHwxRmdk= Date: Mon, 28 Sep 2020 21:50:55 -0700 From: Andrew Morton To: Joonsoo Kim Cc: Linux Memory Management List , LKML , Michal Hocko , Vlastimil Babka , "Aneesh Kumar K . V" , Mel Gorman , kernel-team@lge.com, Joonsoo Kim Subject: Re: [PATCH v2 for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs Message-Id: <20200928215055.02ff9b3ff5e0c392b2403411@linux-foundation.org> In-Reply-To: References: <1601283046-15329-1-git-send-email-iamjoonsoo.kim@lge.com> <20200928165215.f46924bfff9a109131048f81@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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 emptying but > before the allocation could invalidate the effect. Keep local interrupts disabled across the pcp drain and the allocation attempt. > > Or byassing the pcplists for this caller and calling __rmqueue() directly? > > What this patch does is this one. I meant via a different function rather than by adding overhead to the existing commonly-used function.