Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp258156ybz; Fri, 17 Apr 2020 00:14:29 -0700 (PDT) X-Google-Smtp-Source: APiQypIM06NsIuB5yUj9fCuc10WYKyiKTQj7+z4cD/X/kt359fdjJGJDEjqAwRZOf/WiYP1mEjUv X-Received: by 2002:a50:c389:: with SMTP id h9mr1685298edf.1.1587107668999; Fri, 17 Apr 2020 00:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587107668; cv=none; d=google.com; s=arc-20160816; b=QOG33SxYFtRYXzeYq1nbCxlGgA8WANVE68E6o7ro9XEqHPdxGG8gIc+pCfAmFJIHq+ eK1nCXPmuAUCqKhoPT+vGzMXubYl10EExHgLIa0cW4X5Gb+UPWOtYj8y2Q29KaRuf/DW Gazl2GojQDZCrj4Wuf/yu1nd/bPGXa7BtuikZ36ZnB1YbhyiIpM40wiR36LbvXSYskvN dHpbay4SFwunsn8dOE4THkgFBcZ9graTvGFTZ70sQ7OawJt35dN5vEklyCGZgVRZb2Ls lY8AYZDQEhnjbCp/5mEvZv7XUKqBp7feApq4mrzHWlYAX8XJoWv+MqESKf4rP+p75ohE WpMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3EDXCwiltsqt0tcy+QmIvOj65ZR/cE22FWVtGf8KWvI=; b=dEoM8adb7S6lHjMfjcobl4Jj5q0i/5PvsIw6TOMcVbE7KJPe5tweHu7+Owdp4b0RJS x1KWzVzDtSf7GHEbcR2eMRjXgGcxLnxEyz2VKxYU5rCu9KAi3MmyU8/lmnUyYF9yy6ha VyPFKeA6GPK+rM0hvTsBCwEaEXuzX/KdlBWrUSkPvWHbmABFQGZiEUmDek43d12Wjky3 YaQQ6OoNOk4NudzmF1Ml23YGOMUB/ab/zUWUX5S9mw1Try82x/2etLd2/IOjWwODn5tb G4lNMkPabOx/aDUBivazfGIy5JewJ4fqVLR6Uamtt/qu0woNcGpTfJRc9EURrw6HGxvf W+pQ== ARC-Authentication-Results: i=1; mx.google.com; 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 cz5si4685311edb.127.2020.04.17.00.14.06; Fri, 17 Apr 2020 00:14:28 -0700 (PDT) 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; 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 S1728621AbgDQHK0 (ORCPT + 99 others); Fri, 17 Apr 2020 03:10:26 -0400 Received: from verein.lst.de ([213.95.11.211]:56075 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728419AbgDQHK0 (ORCPT ); Fri, 17 Apr 2020 03:10:26 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id A82A768BEB; Fri, 17 Apr 2020 09:10:23 +0200 (CEST) Date: Fri, 17 Apr 2020 09:10:23 +0200 From: Christoph Hellwig To: Tom Lendacky Cc: David Rientjes , Christoph Hellwig , Brijesh Singh , Jon Grimm , Joerg Roedel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org Subject: Re: [patch 5/7] dma-pool: add pool sizes to debugfs Message-ID: <20200417071023.GC19153@lst.de> References: <0c7144e3-057a-959d-0b7d-4a718bd6076c@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c7144e3-057a-959d-0b7d-4a718bd6076c@amd.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 08:45:08AM -0500, Tom Lendacky wrote: > > > On 4/14/20 7:04 PM, David Rientjes wrote: >> The atomic DMA pools can dynamically expand based on non-blocking >> allocations that need to use it. >> >> Export the sizes of each of these pools, in bytes, through debugfs for >> measurement. >> >> Suggested-by: Christoph Hellwig >> Signed-off-by: David Rientjes >> --- >> kernel/dma/pool.c | 41 +++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 41 insertions(+) >> >> diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c >> index cf052314d9e4..3e22022c933b 100644 >> --- a/kernel/dma/pool.c >> +++ b/kernel/dma/pool.c >> @@ -2,6 +2,7 @@ >> /* >> * Copyright (C) 2020 Google LLC >> */ >> +#include >> #include >> #include >> #include >> @@ -15,6 +16,11 @@ >> static struct gen_pool *atomic_pool_dma __ro_after_init; >> static struct gen_pool *atomic_pool_dma32 __ro_after_init; >> static struct gen_pool *atomic_pool_kernel __ro_after_init; >> +#ifdef CONFIG_DEBUG_FS > > I don't think you need the #ifdef any more unless you just want to save > space. All of the debugfs routines have versions for whether > CONFIG_DEBUG_FS is defined or not. Agreed. I can fix this up.