Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1501410pxb; Wed, 10 Feb 2021 09:43:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHx97DteG+xLndSBqmRqgvQotOGocDqtDEw1nIbzvwJBuz5CeBba/X1JZv5+QvENYDfO5V X-Received: by 2002:a17:906:4c4b:: with SMTP id d11mr4067425ejw.387.1612978994310; Wed, 10 Feb 2021 09:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612978994; cv=none; d=google.com; s=arc-20160816; b=oz/Tq6cfd9KiklycP4ymDcrpQx9S8OFyJu6t4SUYGnZvAYXVj4xd9B3bAv5xi8d+Mm kdHSnCtOAYdNvTTZEQwbIm7t4ZkDXYf1FkcfbtplUoOU/6WJLLXISEI//CsGeLeHla5w +FuwxkWeAvgTag/OdcsaiRNFTbCK6j6WNaypbEDm0js1vLCD//yH83IgjDXww+rrtwaE Rs/X2L31B+yBmfoezF3I9baJvqZKXxgaZwJPtMXE4jcqL5omzYNIRU5riaVn06NPTa5U ZKX1JTT0qm+Fq2mfkdG9svkXfUkXE+6hLVU0/NR3ErHIItMEMQOV5VjL8yIMR3mZ/qtT DJZA== 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:sender:dkim-signature; bh=dGLuSqUXXuVXsA+05i4UxiT8airi5DH3dr+tpBhyP/c=; b=UVyvJUhL4/jUNLuqVBrLjXhO3LddyVD4L9jtTgkL3fpOjlP79DJaWtndN4AWmnskWz gj3vpK+r2KdaYSU6iOjREWErGZAUeWwaTPSAQAW+smycd4tiPQCsj6EqqhRXPMXTfOsW z29SFuMn/FYU7sRYIXvX+8atFTv7LKOMcIwmoJswf+bMxnNOe9iHJfIj7sfzQxiGsLvW 9B35ffs0wkFsJwXAc0D6YaZadCN8iCNnBLJddRBbwBD5jJAMy4T7tFC1NZvmmnfVl5QO Zy2kK/3UVkH/FPXFdGlK4frHeXX+2sntePT+rubpnD/2f6t25xcga8reMIUgzrjj+bfY 51BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Kxu7mzpg; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si1712766edu.267.2021.02.10.09.42.50; Wed, 10 Feb 2021 09:43:14 -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=@gmail.com header.s=20161025 header.b=Kxu7mzpg; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232735AbhBJRmT (ORCPT + 99 others); Wed, 10 Feb 2021 12:42:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbhBJRmK (ORCPT ); Wed, 10 Feb 2021 12:42:10 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3361FC061574 for ; Wed, 10 Feb 2021 09:41:30 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id o21so1676729pgn.12 for ; Wed, 10 Feb 2021 09:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dGLuSqUXXuVXsA+05i4UxiT8airi5DH3dr+tpBhyP/c=; b=Kxu7mzpgBKECFR5krBksL+lnN9+0uI9rIhAvTImUhhRVyqZskVAW9gg56z+9MSmHAu 44MkLA6Z0+aqFH9qFdSWaEBUzFp3zsYARIYTFzinMoJQd+inujWP0YYGgAjZtzHL6zLT 1/YhVmuECobMmdppuvOZet3MLl98mguySNgYElotTGp3yCH2wnE873Uv/+zo9h6XP8sw JxbT3KubkCYrOFtyQNxtJl7qym3OZZuflUyGOEtJEOzv82ljCAO+lzIdas+BGAC0dJ4m KD8ADFEuP3eFBgbdc0cb0HIUyAD1iFhXNWFZIxOQwUXBbYcqnc//zNWL3r7Qo9WuQ44m 8d6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=dGLuSqUXXuVXsA+05i4UxiT8airi5DH3dr+tpBhyP/c=; b=iCfTGChxq5hPrjMg10VR3+NWtkNmijnBFZ/8C/uilNLTcjH9QvCByF79+ctaoPwOCg jMzXQz1salLOmj9DfcVQh8ALC1SjZ6mVZqN7Wpn1JAPZuaGQZg8bOKPyeUvCaL1SpmUa Su0hzCvnbs0LShma5dsqtypQN47bcrXikvS11yGQ5R/jYLMj8ni27E7Vd/Rh2psrRUuV 2G/fU4v/BdUKluQ7uguFj/3hQu/mM6CR0B7bsGq5OTlSvuuGVZJJTtsYGWxoS/1CQ4Z1 giN18UYPfdxIXcIUN4Ril6Yz7C5uJTf9IeGsIYePJjccJsQqJx7CR/VmUpkLyreqryMf 7SBA== X-Gm-Message-State: AOAM531SHEwvahlnGvexexfT3cUpanE72olTjha9JiVoPHioM0959s2w PrrAClGD9P8c2ekSp07UY/M= X-Received: by 2002:a63:1d25:: with SMTP id d37mr4057589pgd.205.1612978889691; Wed, 10 Feb 2021 09:41:29 -0800 (PST) Received: from google.com ([2620:15c:211:201:e5b0:be96:1dfb:a1f6]) by smtp.gmail.com with ESMTPSA id z10sm3140140pff.179.2021.02.10.09.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 09:41:28 -0800 (PST) Sender: Minchan Kim Date: Wed, 10 Feb 2021 09:41:26 -0800 From: Minchan Kim To: Suren Baghdasaryan Cc: Sumit Semwal , John Stultz , LKML , Hridya Valsaraju , John Dias Subject: Re: [PATCH] dma-buf: system_heap: do not warn for costly allocation Message-ID: References: <20210210162632.3903128-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 09:24:52AM -0800, Suren Baghdasaryan wrote: > The code looks fine to me. Description needs a bit polishing :) > > On Wed, Feb 10, 2021 at 8:26 AM Minchan Kim wrote: > > > > Linux VM is not hard to support PAGE_ALLOC_COSTLY_ODER allocation > > so normally expects driver passes __GFP_NOWARN in that case > > if they has fallback options. > > > > system_heap in dmabuf is the case so do not flood into demsg > > with the warning for recording more precious information logs. > > (below is ION warning example I got but dmabuf system heap is > > nothing different). > > Suggestion: > Dmabuf system_heap allocation logic starts with the highest necessary > allocation order before falling back to lower orders. The requested > order can be higher than PAGE_ALLOC_COSTLY_ODER and failures to > allocate will flood dmesg with warnings. Such high-order allocations > are not unexpected and are handled by the system_heap's allocation > fallback mechanism. > Prevent these warnings when allocating higher than > PAGE_ALLOC_COSTLY_ODER pages using __GFP_NOWARN flag. > > Below is ION warning example I got but dmabuf system heap is nothing different: I will take it. Thanks, Suren!