* [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
@ 2012-09-01 0:55 Shuah Khan
2012-09-04 23:24 ` Shuah Khan
2012-09-04 23:28 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Shuah Khan @ 2012-09-01 0:55 UTC (permalink / raw)
To: fujita.tomonori, akpm, paul.gortmaker, bhelgaas, amwang,
Konrad Rzeszutek Wilk
Cc: linux-kernel, shuahkhan
Add kernel error message to track iotlb overflow buffer triggers to understand
how often the overflow buffer gets used.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
---
lib/swiotlb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 45bc1f8..597d7b9 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -682,6 +682,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
if (!map) {
swiotlb_full(dev, size, dir, 1);
map = io_tlb_overflow_buffer;
+ dev_err(dev, "SWIOTLB is full. Mapping overflow buffer.\n");
}
dev_addr = swiotlb_virt_to_bus(dev, map);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
2012-09-01 0:55 [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage Shuah Khan
@ 2012-09-04 23:24 ` Shuah Khan
2012-09-04 23:28 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2012-09-04 23:24 UTC (permalink / raw)
To: konrad.wilk
Cc: akpm, paul.gortmaker, bhelgaas, amwang, linux-kernel,
fujita.tomonori, shuahkhan
On Fri, 2012-08-31 at 18:55 -0600, Shuah Khan wrote:
> Add kernel error message to track iotlb overflow buffer triggers to understand
> how often the overflow buffer gets used.
Does this change look reasonable? My intent is to be able to assess how
often the overflow buffer usage gets triggered.
-- Shuah
>
> Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> ---
> lib/swiotlb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> index 45bc1f8..597d7b9 100644
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -682,6 +682,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
> if (!map) {
> swiotlb_full(dev, size, dir, 1);
> map = io_tlb_overflow_buffer;
> + dev_err(dev, "SWIOTLB is full. Mapping overflow buffer.\n");
> }
>
> dev_addr = swiotlb_virt_to_bus(dev, map);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
2012-09-01 0:55 [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage Shuah Khan
2012-09-04 23:24 ` Shuah Khan
@ 2012-09-04 23:28 ` Andrew Morton
2012-09-05 14:38 ` Shuah Khan
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2012-09-04 23:28 UTC (permalink / raw)
To: shuah.khan
Cc: fujita.tomonori, paul.gortmaker, bhelgaas, amwang,
Konrad Rzeszutek Wilk, linux-kernel, shuahkhan
On Fri, 31 Aug 2012 18:55:59 -0600
Shuah Khan <shuah.khan@hp.com> wrote:
> Add kernel error message to track iotlb overflow buffer triggers to understand
> how often the overflow buffer gets used.
>
> Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> ---
> lib/swiotlb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> index 45bc1f8..597d7b9 100644
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -682,6 +682,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
> if (!map) {
> swiotlb_full(dev, size, dir, 1);
> map = io_tlb_overflow_buffer;
> + dev_err(dev, "SWIOTLB is full. Mapping overflow buffer.\n");
> }
>
> dev_addr = swiotlb_virt_to_bus(dev, map);
hm. I would view this as a developer-only debugging thing which
shouldn't be present in production code. Plus there's a potential that
some poor person will have his logs flooded with this message.
A more typical way of handling this would be to increment a stats
counter, accessible in procfs or debugfs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
2012-09-04 23:28 ` Andrew Morton
@ 2012-09-05 14:38 ` Shuah Khan
0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2012-09-05 14:38 UTC (permalink / raw)
To: Andrew Morton
Cc: fujita.tomonori, paul.gortmaker, bhelgaas, amwang,
Konrad Rzeszutek Wilk, linux-kernel, shuahkhan
On Tue, 2012-09-04 at 16:28 -0700, Andrew Morton wrote:
> On Fri, 31 Aug 2012 18:55:59 -0600
> Shuah Khan <shuah.khan@hp.com> wrote:
>
> > Add kernel error message to track iotlb overflow buffer triggers to understand
> > how often the overflow buffer gets used.
> >
> > Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> > ---
> > lib/swiotlb.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> > index 45bc1f8..597d7b9 100644
> > --- a/lib/swiotlb.c
> > +++ b/lib/swiotlb.c
> > @@ -682,6 +682,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
> > if (!map) {
> > swiotlb_full(dev, size, dir, 1);
> > map = io_tlb_overflow_buffer;
> > + dev_err(dev, "SWIOTLB is full. Mapping overflow buffer.\n");
> > }
> >
> > dev_addr = swiotlb_virt_to_bus(dev, map);
>
> hm. I would view this as a developer-only debugging thing which
> shouldn't be present in production code. Plus there's a potential that
> some poor person will have his logs flooded with this message.
Yes. I agree.
>
> A more typical way of handling this would be to increment a stats
> counter, accessible in procfs or debugfs.
>
Right. I will work on it. Maybe there is a way to combine this with
dma-debug dma mapping error tracking work I am doing - will look into.
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-05 14:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-01 0:55 [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage Shuah Khan
2012-09-04 23:24 ` Shuah Khan
2012-09-04 23:28 ` Andrew Morton
2012-09-05 14:38 ` Shuah Khan
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).