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.7 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,URIBL_BLOCKED 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 87EF7C4361B for ; Mon, 14 Dec 2020 14:17:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 260B522B4B for ; Mon, 14 Dec 2020 14:17:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 260B522B4B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B2616B0070; Mon, 14 Dec 2020 09:17:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33C016B0072; Mon, 14 Dec 2020 09:17:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 203976B0073; Mon, 14 Dec 2020 09:17:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 070486B0070 for ; Mon, 14 Dec 2020 09:17:19 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BD8F5181AEF1A for ; Mon, 14 Dec 2020 14:17:18 +0000 (UTC) X-FDA: 77592090156.14.death14_4c01ea12741b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 9E9FE1822987A for ; Mon, 14 Dec 2020 14:17:18 +0000 (UTC) X-HE-Tag: death14_4c01ea12741b X-Filterd-Recvd-Size: 2932 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Dec 2020 14:17:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1607955437; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/aaX1gWpPQn3qcwwnBwjlwFxHCcIQKKOnugT2MXEnQY=; b=JnWU55ELyZ1I/pYFi0DUWGkuuIomcSV7Ud/2hlzpn/6AsXg4hGG78gZPiDej8YkJ22gHUY P7TILbaB5pfqzoHXn4fAyYz5RrPJvrAI2JZEhQ1IzLCP+N98sgfIWovkV8iNzfmlFQ8PuG GOll1wMpJGgvxZ4aSC90SuOe695TgDM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CBA21AC10; Mon, 14 Dec 2020 14:17:16 +0000 (UTC) Date: Mon, 14 Dec 2020 15:17:15 +0100 From: Michal Hocko To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, jgg@ziepe.ca, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 4/6] mm: honor PF_MEMALLOC_PIN for all movable pages Message-ID: <20201214141715.GF32193@dhcp22.suse.cz> References: <20201211202140.396852-1-pasha.tatashin@soleen.com> <20201211202140.396852-5-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201211202140.396852-5-pasha.tatashin@soleen.com> 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 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 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. 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. With that addressed, feel free to add Acked-by: Michal Hocko -- Michal Hocko SUSE Labs