[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8760fds683.fsf@miraculix.mork.no>
Date: Fri, 30 Jun 2017 20:03:40 +0200
From: Bjørn Mork <bjorn@...k.no>
To: "Baxter\, Jim" <jim_baxter@...tor.com>
Cc: <linux-usb@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Oliver Neukum <oliver@...kum.org>,
David Laight <David.Laight@...LAB.COM>
Subject: Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low
"Baxter, Jim" <jim_baxter@...tor.com> writes:
> I tested this with printk's to show when the low memory code was triggered
> and the value of ctx->tx_low_mem_val and ctx->tx_low_mem_max_cnt.
> I created a workqueue that slowly used up the atomic memory until the
> code is triggered.
>
> I could add debug prints, though I have noticed that cdc_ncm_fill_tx_frame()
> does not currently have any debug prints do you think this is because it can be
> called in an atomic context and I think debug messages if enabled could cause
> too great a delay?
Yes, I guess you're right. Maybe count the number of failed allocations
and export it along with the other driver private counters? Or export
the tx_curr_size as a sysfs attribute? Or both?
Just an idea... I don't expect to see this code ever being hit on my
systems :-)
Bjørn
Powered by blists - more mailing lists