Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679049

Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

From Bjørn Mork <bjorn@mork.no>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low
Date 2017-06-30 20:10 +0200
Message-ID <tY8wF-mI-9@gated-at.bofh.it> (permalink)
References <tXrUK-29U-23@gated-at.bofh.it> <tXrUK-29U-21@gated-at.bofh.it> <tY83D-8nx-1@gated-at.bofh.it> <tY8n0-8uh-19@gated-at.bofh.it>
Organization m

Show all headers | View raw


"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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Jim Baxter <jim_baxter@mentor.com> - 2017-06-28 22:40 +0200
  Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low "Baxter, Jim" <jim_baxter@mentor.com> - 2017-06-30 19:10 +0200
  Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel  memory low David Miller <davem@davemloft.net> - 2017-06-30 19:10 +0200
  Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Bjørn Mork <bjorn@mork.no> - 2017-06-30 19:40 +0200
    Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low "Baxter, Jim" <jim_baxter@mentor.com> - 2017-06-30 20:00 +0200
      Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Bjørn Mork <bjorn@mork.no> - 2017-06-30 20:10 +0200
  Re: [PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel  memory low David Miller <davem@davemloft.net> - 2017-07-03 11:00 +0200

csiph-web