Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2631522pxu; Mon, 14 Dec 2020 07:17:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyagUIbv/fONrwns4ukx74kAIzSpZciAsekVWSEcArO/07VK0g0GO/YNhy4QDzoliPTCL2+ X-Received: by 2002:a17:906:1294:: with SMTP id k20mr22446233ejb.404.1607959045098; Mon, 14 Dec 2020 07:17:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607959045; cv=none; d=google.com; s=arc-20160816; b=AVBsKMDR1dUH19s9KSg5oaxfnzKJTQvE8zCOfxNZKQpvZQcOLxt/ySvO0pxJ5s802l NvfPyJ9SMECr9lFVxok6RbxyMgBXTsG1KIGSCd4FuFhp8OVz791Wjsgu95Xtf0IAjP/2 SxqTFiAxK3qZlhBO0241QMd7C2MGSAd50S9YPQzjrfJ/CuBlv6Qd80qvo2BEx85KiYrS ASSF0Lytp6/zZ+izXYsGHiNcN9KnmxeVJJ+tvP2mbijp7kka0AIRkGIiI487FOfhi6QE pgpv+aGUmmW8ukrSvyXy5l0UbfmllNPH4V4HNurMg9RokA24cugrqtoR03MGIOcOgsNL g1pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/aaX1gWpPQn3qcwwnBwjlwFxHCcIQKKOnugT2MXEnQY=; b=jOhvl46X6Pio5PjbNgMEekLsnNx3i4jtwYskqkF0aIJ+7rBMO3AyzzRRZR/CKyuBdT N6gL1HKVqib09zCCMpRQX1ib+aRvWEBweiR6mo80+f6/TEYnFvOQxRIkDJhjasi6pHtl fc2kQDiWtDUICPl+64OL+cVR/YOZ+jV3FCGFl1M6i0k20q925VYH+Si6fGAqyzOn7MuP WbOMBYMhCyBtPI1i+p1Z5Yb4FYGFMGDXTmSgrF96XEYbTQZgWhL3Um3rTUlv6JMfnqKn MYt3X69t8mhm7dFSwLaHQ00E7aKXO+5vTVJXuu9BjthG5puLXu+myUBVweyiwmGKOrLv xIXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=JnWU55EL; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se25si9883393ejb.82.2020.12.14.07.16.59; Mon, 14 Dec 2020 07:17:25 -0800 (PST) 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=@suse.com header.s=susede1 header.b=JnWU55EL; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439838AbgLNOSG (ORCPT + 99 others); Mon, 14 Dec 2020 09:18:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:37890 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439156AbgLNOSD (ORCPT ); Mon, 14 Dec 2020 09:18:03 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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