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 C30D5C4346E for ; Tue, 29 Sep 2020 04:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85BC3208FE for ; Tue, 29 Sep 2020 04:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601355057; bh=gV6QEyJxDl+g2byKjvydjtaPQ921rhOyIz0suE2c25k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=PmlQ4gErq2+gRScEKQE++mnelAwThTk40ZVVJaU67T3u5/sl7sU7cn5qWjTVfxufD y5gK3NX93CjlOFzflVrk1jU7XygW7Zghi5dBxLzBHophyjdtHZFTdm7uou0f9EeIyv mR99d48/Q+WxXi7s+s+/0e9iN0xx2VF82u27Dv7M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725856AbgI2Eu4 (ORCPT ); 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.