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=-3.5 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 4FBD4C55179 for ; Thu, 29 Oct 2020 08:13:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC48220780 for ; Thu, 29 Oct 2020 08:13:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC48220780 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D5CD6E8A5; Thu, 29 Oct 2020 08:13:02 +0000 (UTC) Received: from r3-20.sinamail.sina.com.cn (r3-20.sinamail.sina.com.cn [202.108.3.20]) by gabe.freedesktop.org (Postfix) with SMTP id 1DCC46E821 for ; Thu, 29 Oct 2020 07:02:34 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([103.193.190.174]) by sina.com with ESMTP id 5F9A6905000214DE; Thu, 29 Oct 2020 15:02:30 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 73741215073683 From: Hillf Danton To: John Stultz Subject: Re: [PATCH v4 5/7] dma-buf: system_heap: Allocate higher order pages if available Date: Thu, 29 Oct 2020 15:02:21 +0800 Message-Id: <20201029070221.2856-1-hdanton@sina.com> In-Reply-To: <20201029001624.17513-6-john.stultz@linaro.org> References: <20201029001624.17513-1-john.stultz@linaro.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 29 Oct 2020 08:12:48 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Jones , Robin Murphy , Liam Mark , lkml , dri-devel@lists.freedesktop.org, Ezequiel Garcia , linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 29 Oct 2020 00:16:22 +0000 John Stultz wrote: > > +#define HIGH_ORDER_GFP (((GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN \ > + | __GFP_NORETRY) & ~__GFP_RECLAIM) \ > + | __GFP_COMP) > +#define LOW_ORDER_GFP (GFP_HIGHUSER | __GFP_ZERO | __GFP_COMP) > +static gfp_t order_flags[] = {HIGH_ORDER_GFP, LOW_ORDER_GFP, LOW_ORDER_GFP}; > +static const unsigned int orders[] = {8, 4, 0}; > +#define NUM_ORDERS ARRAY_SIZE(orders) A two-line comment helps much understand the ORDERs above if it specifies the reasons behind the detour to HPAGE_PMD_ORDER and PAGE_ALLOC_COSTLY_ORDER. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel