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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 254E2C4361B for ; Tue, 15 Dec 2020 05:25:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98B2C222BB for ; Tue, 15 Dec 2020 05:25:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98B2C222BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D2E2F8D0008; Tue, 15 Dec 2020 00:25:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D03E78D0005; Tue, 15 Dec 2020 00:25:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C19398D0008; Tue, 15 Dec 2020 00:25:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id A6E8E8D0005 for ; Tue, 15 Dec 2020 00:25:08 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 59FA78249980 for ; Tue, 15 Dec 2020 05:25:08 +0000 (UTC) X-FDA: 77594377896.24.bed97_24079b527420 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 3948E1A4A7 for ; Tue, 15 Dec 2020 05:25:08 +0000 (UTC) X-HE-Tag: bed97_24079b527420 X-Filterd-Recvd-Size: 4872 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Dec 2020 05:25:07 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id x16so25842863ejj.7 for ; Mon, 14 Dec 2020 21:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MScTYxoSfPHDqz2+BVl+z1OvhQSJGBAoa571MEAuHI4=; b=PqgXMNZceI4SB6cXF6KAwobxmAq2mWRYSmt1J7X2On2p9iERZ9EHp0wSCUHmr46nsA SiCwHB16rEaVFSz5S2cNai9io+ir85igzuvOeQxyzjrpDIJyYqM0edHmhXroY3ugrf5U vG+K6XMPNKiGltpjDNsd/fv+34ukFW87xPush957W4n8LPg+NRTkXlBKEFrh7RDL3ELg +NrHsEN0yhForooPRicwb0+rf2zyzDHoKPiRphHpvnYLVXlHvKXCabrv89+aqbKRIm7h ppofgZKJxBzXzrqZtg2ol62BAXZhibT3/fhVl7ar7++OuCr2CNrYzxhRDTMLjFZ7y4i5 wn9A== 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; bh=MScTYxoSfPHDqz2+BVl+z1OvhQSJGBAoa571MEAuHI4=; b=Ynpll6HvUUFNEtmdfXKx14WHgkKyObmji4AmnwtatcMEQfezuurE4KVMuzma0kKEF9 s+ocw+DuAFm6rsYPczuy0fRoyrMwtX5ICdKQ7WUL3wlaK/kdva9NmJmEJaRhH03mxjir 7/N+I2ZwF81/6ajBZX5d04jNIqBQpqP0xWM8EDRJEl4v1wr2Lvj9c5tbYLh1kwZvJrXl vJIlei1eHrSxpdspCN9k5Td6zIhZmEsBdqYUVfwS9Quj+i0AIYeBpiM7Jpy9ZbIXYekI dd8tlyIDANkoa4OpC2YaU+Hu4yHigRkK1RQZCGn86BcYNALYey8eWYxh/EJb5GXS33A8 uZjQ== X-Gm-Message-State: AOAM5306jMuiPT1FSIrQ/IdXJ2bmWzL44bLjdCGSpnP0gc7JTMGB6b08 qE7YiPRtW1rg3jnS2IY++yZankC73whegBIgR2/995IQr7Xsygsr X-Google-Smtp-Source: ABdhPJzSf89CWG1p4ITg2ctL0KI5p4iXHWylwwTq4hUdYg2dZW8IXnq3qsDC1bdRJLlKyGL3SSbqnjripuO24mHQCKA= X-Received: by 2002:a17:906:4a4f:: with SMTP id a15mr25977973ejv.541.1608009906509; Mon, 14 Dec 2020 21:25:06 -0800 (PST) MIME-Version: 1.0 References: <20201211202140.396852-1-pasha.tatashin@soleen.com> <20201211202140.396852-5-pasha.tatashin@soleen.com> <20201214141715.GF32193@dhcp22.suse.cz> In-Reply-To: <20201214141715.GF32193@dhcp22.suse.cz> From: Pavel Tatashin Date: Tue, 15 Dec 2020 00:24:30 -0500 Message-ID: Subject: Re: [PATCH v3 4/6] mm: honor PF_MEMALLOC_PIN for all movable pages To: Michal Hocko Cc: LKML , linux-mm , Andrew Morton , Vlastimil Babka , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Jason Gunthorpe , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard , Linux Doc Mailing List Content-Type: text/plain; charset="UTF-8" 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, Dec 14, 2020 at 9:17 AM Michal Hocko wrote: > > On Fri 11-12-20 15:21:38, Pavel Tatashin wrote: > [...] > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index c2dea9ad0e98..4d8e7f801c66 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -3802,16 +3802,12 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) > > return alloc_flags; > > } > > > > -static inline unsigned int current_alloc_flags(gfp_t gfp_mask, > > - unsigned int alloc_flags) > > +static inline unsigned int cma_alloc_flags(gfp_t gfp_mask, > > + unsigned int alloc_flags) > > Do you have any strong reason to rename? Even though the current Yes :) > implementation only does something for cma I do not think this is all > that important. The naming nicely fits with current_gfp_context so I > would stick with it. I am renaming because current->flags is removed from this function, therefore keeping the name becomes misleading. This function only addresses cma flag check without looking at the thread local state now. > > Other than that the patch looks reasonable. I would just add a comment > explaining that current_alloc_flags should be called _after_ > current_gfp_context because that one might change the gfp_mask. Thanks, I will add it. > > With that addressed, feel free to add > Acked-by: Michal Hocko Thank you, Pasha