Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3518721pxk; Mon, 28 Sep 2020 21:53:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw73t4sAT9IT3auscWxB8sNu9BH/N2y7TgR+GaxPIO5ksA6lFtuu7araEdqkaDfsHtQxlJl X-Received: by 2002:a17:906:4f16:: with SMTP id t22mr2054339eju.40.1601355188674; Mon, 28 Sep 2020 21:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601355188; cv=none; d=google.com; s=arc-20160816; b=y0cLp1Yr4qyfPg+SiqISw8yeXfN7nnFbvJQcmgtEGJMP97KP/TKRV+8jFk3LaqMEvo nEA4TMh/R7ufo0Sd1Xg771QTa2os3ndtFzVMHVyYEs8UsmkQFahWDU2bVvOaI2r9ikv8 Dpui6H7gtgUVhgzwR0yzJgl8jDNy3CdpHYcU2ghdBtMYjrVJUlOecPy7/MvEtt7S3huR HGjdH3n1orc+MQAR5+VzkA3jOK0Y2039q50KfZi17IqBVkeaaYn13MnaZuxoS/mhWSDV F8wTvSb4+1CXLfQMUBo/28FaHry3KXr49i6sDNWxMyeUYYvYXR23sD7VoMFMaapVezcn 0ezg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=aKaBwZ5zMBFuVQS/JuQNWshn5wBeL0D+d9i9RbiLgvo=; b=cuVJgHBxFLF3IBTuaq0KCNrQrSLmhHRp3ro+ikvFVQvGuEt0vYUzPgxF+5SuKsXSCv AiLR1kUuJE1pd784yGud5h4tyeVOeUKOIKdGegOoA9NMP4DIYwxaE7nu9QDdg/1MX9Tl xP+CuR9FVW0cwobgd2WQfanW3gmYmKAdadea7fbjlLvw6Wfbibwqx60ZsG06YftchWHw 8FC7Ei73gF532MMKjCzDA9yU4JblIiWZkRtB/dOfIV7olj9qST7FGcmQp3t9rOi94qLh EBRiyqEkFWWllR736/dYipPY8Hr6ryiu21/6tNo7NKhI/CZZVV3oRVxnoVESD3+8AxsB 0Sbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sCMA5ZZQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bk4si1922616ejb.215.2020.09.28.21.52.42; Mon, 28 Sep 2020 21:53:08 -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=@kernel.org header.s=default header.b=sCMA5ZZQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725779AbgI2Eu4 (ORCPT + 99 others); Tue, 29 Sep 2020 00:50:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:56488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgI2Eu4 (ORCPT ); Tue, 29 Sep 2020 00:50:56 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.