linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "hch@lst.de" <hch@lst.de>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: "Petr Tesařík" <petr@tesarici.cz>, "hch@lst.de" <hch@lst.de>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"Dexuan Cui" <decui@microsoft.com>,
	"Tianyu Lan" <Tianyu.Lan@microsoft.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] swiotlb: Track and report io_tlb_used high water mark in debugfs
Date: Tue, 11 Apr 2023 05:41:37 +0200	[thread overview]
Message-ID: <20230411034137.GB15679@lst.de> (raw)
In-Reply-To: <BYAPR21MB168877F6B7BF005B91F9E8CED7969@BYAPR21MB1688.namprd21.prod.outlook.com>

On Fri, Apr 07, 2023 at 10:05:26PM +0000, Michael Kelley (LINUX) wrote:
> > Yes, this works fine now, but why are total_used and used_hiwater
> > global variables? If you make them fields in struct io_tlb_mem
> > (possibly guarded with #ifdef CONFIG_DEBUG_FS), you can get rid of the
> > check. Of course, in instances other than io_tlb_default_mem these
> > fields would not be exported to userspace through debugfs, but if really
> > needed, I can at least find them in a crash dump (or read them through
> > /proc/kcore).
> > 
> 
> Got it.
> 
> Your previously comments mentioned making them fields in struct io_tlb_mem,
> and I missed your point.  :-(   I got focused on fixing the accounting for
> DEBUG_FS so it didn't include the non-default pools, and didn't pick up on the
> idea of doing the accounting for the non-default pools even though the values
> aren't exposed in /sys.   I'll fix this in the next version.

FYI, I agree that per-instance accounting is probably the better way,
too.

  reply	other threads:[~2023-04-11  3:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  4:45 [PATCH v3 1/1] swiotlb: Track and report io_tlb_used high water mark in debugfs Michael Kelley
2023-04-07  5:50 ` Christoph Hellwig
2023-04-07 22:01   ` Michael Kelley (LINUX)
2023-04-11  3:42     ` Christoph Hellwig
2023-04-07 10:55 ` Petr Tesařík
2023-04-07 22:05   ` Michael Kelley (LINUX)
2023-04-11  3:41     ` hch [this message]
2023-04-12 17:30       ` Michael Kelley (LINUX)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230411034137.GB15679@lst.de \
    --to=hch@lst.de \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=decui@microsoft.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mikelley@microsoft.com \
    --cc=petr@tesarici.cz \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).