lkml.org 
[lkml]   [2017]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low
Date
"Baxter, Jim" <jim_baxter@mentor.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

\
 
 \ /
  Last update: 2017-06-30 23:15    [W:0.039 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site