Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3106448pxu; Mon, 14 Dec 2020 21:29:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxTUwgy83bpnAwxsD2hCOjEZzWnmpGPvLaEWD26Jq75aMnAz10rKAHbPJyNk7lydujy2Ix X-Received: by 2002:a05:6402:895:: with SMTP id e21mr28200131edy.284.1608010166805; Mon, 14 Dec 2020 21:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608010166; cv=none; d=google.com; s=arc-20160816; b=vK/1dMlZ8ZSs7O5tTtwTIqKKGzH1J+r5r/Amf5PTRRXIUvQboiqp5lYGN6gXU0DbvN q4nGayXn8wgKqEN8oMHYpPu1pWw6I+kF+QcCTHSIj3wkzOUH/aNZRzHaZmtFL/slOizS 5lVPORu1ef4VNslNbHk9GMSb0+aC81RaZzZmGZ7bK5Lv2Gj3VQXRx7mEi2tQYoLibJro FwUf5hkqYg5+qezRVe2HZFVujWFP0P898AjuTD5m4gA+EMeTo5/pAbqEUsjIeoswUyeg Zh97imiFBEjj8ie9g1igE2+6X/DR3lX/rbnRYKMKO3hmxrpNzSzwSo2nfvK9R2CaNTVL pabg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MScTYxoSfPHDqz2+BVl+z1OvhQSJGBAoa571MEAuHI4=; b=NPJZiOyXBh589PqMIWD7f6cx8b8sGywaWCmypojdzZBlskk+I668mYsJJzQPLwzvfY w9bZmqEn8UHd1MIOyMnfXXQ2jSjQU6hQ6GG6sszmj4vQuDSN5LlxOP15q4YZGsANsG4n 9Tcqa944vEdJFAELvCOaXMhmS9jW+w9dXTw2HRoGjV5vC57TbTCejj4YnUlXI8A17D5e fAZ8DTNpc7buVKnYVuwCRKOYbGGpsAncmEYQ0SoLZ1YDtggP7YZPVb6lCkoVcdfFOayX FstTXWctt7CHbroI6uUEO64QyezheIOnB5ketxfQ/d23K+Tv3ADeHrvdZYnbu3r4PNiT MNxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=PqgXMNZc; 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 w10si312289edv.243.2020.12.14.21.29.04; Mon, 14 Dec 2020 21:29:26 -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=@soleen.com header.s=google header.b=PqgXMNZc; 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 S1726147AbgLOF0B (ORCPT + 99 others); Tue, 15 Dec 2020 00:26:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbgLOFZs (ORCPT ); Tue, 15 Dec 2020 00:25:48 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5DF3C06179C for ; Mon, 14 Dec 2020 21:25:07 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id ce23so25839982ejb.8 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=MIxXkMzR9x5S5VstOUbXczfsUTb+F2qa/iIs4T+riHKFreu1uwnfp9qg9XZq4Wx7+E jFdZXYIHzMfpPidC5IDqhcegNzFOdW886zbmGFSKbP4IAwXEIA76SCjs182SFtozMFxC JRpsx+jcmDpvWxlxSC3G61Ff0kt2SFK8cXzFSH4pFuALmgDrhzrTEZTrYNybGXKga9U6 GmS4uqZ19gPeSW1C1NT3dpwYftpOxU5e61rqaWcM7aTT7crize5S3mGZAKno0c72DPqw xVW+VtUO6ZwwcsfBfP+sGkxCL89lCaHHbHCTmtIgOksj/jIaSh+0NVvH6xkMqz6xhO0z AeLQ== X-Gm-Message-State: AOAM531M2h/8cqV86w9ANaRCj3wuDFi/GFffC+FxaumRCUCwYbH4S+gP gZ7u8oRwh4hfcChl4bOayW8bv0s/mVifniATli5LjQ== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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