Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-06-12 Thread Baxter, Jim
From: Oliver Neukum (oneu...@suse.com) Sent: Mon, 12 Jun 2017 12:24:07 +0200 > Am Dienstag, den 23.05.2017, 20:06 +0100 schrieb Jim Baxter: >> From: David S. Miller (da...@davemloft.net) >> Sent: Tue, 23 May 2017 11:26:25 -0400 >>> >>> From: Oliver Neukum >>> Date: Tue, 23 May

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-06-12 Thread Baxter, Jim
From: Oliver Neukum (oneu...@suse.com) Sent: Mon, 12 Jun 2017 12:24:07 +0200 > Am Dienstag, den 23.05.2017, 20:06 +0100 schrieb Jim Baxter: >> From: David S. Miller (da...@davemloft.net) >> Sent: Tue, 23 May 2017 11:26:25 -0400 >>> >>> From: Oliver Neukum >>> Date: Tue, 23 May 2017 10:42:48

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread Baxter, Jim
From: David S. Miller (da...@davemloft.net) Sent: Tue, 23 May 2017 11:26:25 -0400 > From: Oliver Neukum > Date: Tue, 23 May 2017 10:42:48 +0200 > >> >> We could use a counter. After the first failure, do it once, after the >> second twice and so on. And reset the counter as a

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread Baxter, Jim
From: David S. Miller (da...@davemloft.net) Sent: Tue, 23 May 2017 11:26:25 -0400 > From: Oliver Neukum > Date: Tue, 23 May 2017 10:42:48 +0200 > >> >> We could use a counter. After the first failure, do it once, after the >> second twice and so on. And reset the counter as a higher order >>

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread David Miller
From: Oliver Neukum Date: Tue, 23 May 2017 10:42:48 +0200 > Am Montag, den 22.05.2017, 11:54 -0400 schrieb David Miller: >> >> Unfortunately without a real notifier of some sort (there isn't one, and >> it isn't actually easy to come up with a clean way to do this which is >>

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread David Miller
From: Oliver Neukum Date: Tue, 23 May 2017 10:42:48 +0200 > Am Montag, den 22.05.2017, 11:54 -0400 schrieb David Miller: >> >> Unfortunately without a real notifier of some sort (there isn't one, and >> it isn't actually easy to come up with a clean way to do this which is >> probably why it

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread Oliver Neukum
Am Montag, den 22.05.2017, 11:54 -0400 schrieb David Miller: > > Unfortunately without a real notifier of some sort (there isn't one, and > it isn't actually easy to come up with a clean way to do this which is > probably why it doesn't exist yet in the first place) I really cannot > recommend

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-23 Thread Oliver Neukum
Am Montag, den 22.05.2017, 11:54 -0400 schrieb David Miller: > > Unfortunately without a real notifier of some sort (there isn't one, and > it isn't actually easy to come up with a clean way to do this which is > probably why it doesn't exist yet in the first place) I really cannot > recommend

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread David Miller
From: "Baxter, Jim" Date: Mon, 22 May 2017 16:45:42 +0100 > From: David S. Miller (da...@davemloft.net) > Sent: Wed, 17 May 2017 14:18:19 -0400 > >> >> When there isn't memory pressure this will hurt performance of >> course. >> >> It is a quite common paradigm to back

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread David Miller
From: "Baxter, Jim" Date: Mon, 22 May 2017 16:45:42 +0100 > From: David S. Miller (da...@davemloft.net) > Sent: Wed, 17 May 2017 14:18:19 -0400 > >> >> When there isn't memory pressure this will hurt performance of >> course. >> >> It is a quite common paradigm to back down to 0 order memory

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread Baxter, Jim
From: David S. Miller (da...@davemloft.net) Sent: Wed, 17 May 2017 14:18:19 -0400 > > When there isn't memory pressure this will hurt performance of > course. > > It is a quite common paradigm to back down to 0 order memory requests > when higher order ones fail, so this isn't such a bad

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread Baxter, Jim
From: David S. Miller (da...@davemloft.net) Sent: Wed, 17 May 2017 14:18:19 -0400 > > When there isn't memory pressure this will hurt performance of > course. > > It is a quite common paradigm to back down to 0 order memory requests > when higher order ones fail, so this isn't such a bad

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread Oliver Neukum
Am Freitag, den 19.05.2017, 14:46 + schrieb David Laight: > For XHCI it isn't too bad because it will do arbitrary scatter-gather > (apart from the ring end). > But I believe the earlier controllers only support fragments that > end on usb packet boundaries. > > I looked at the usbnet code a

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread Oliver Neukum
Am Freitag, den 19.05.2017, 14:46 + schrieb David Laight: > For XHCI it isn't too bad because it will do arbitrary scatter-gather > (apart from the ring end). > But I believe the earlier controllers only support fragments that > end on usb packet boundaries. > > I looked at the usbnet code a

RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread David Laight
From: Bjørn Mork > Sent: 19 May 2017 14:56 ... > Unless someone has a nice way to just collect a list of skbs and have > them converted to proper framing on the fly when transmitting, without > having to care about USB packet boundaries. skb can be linked into arbitrary chains (or even trees),

RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread David Laight
From: Bjørn Mork > Sent: 19 May 2017 14:56 ... > Unless someone has a nice way to just collect a list of skbs and have > them converted to proper framing on the fly when transmitting, without > having to care about USB packet boundaries. skb can be linked into arbitrary chains (or even trees),

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread Bjørn Mork
David Laight writes: > From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Jim Baxter >> Sent: 16 May 2017 18:41 >> >> The CDC-NCM driver can require large amounts of memory to create >> skb's and this can be a problem when the

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread Bjørn Mork
David Laight writes: > From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Jim Baxter >> Sent: 16 May 2017 18:41 >> >> The CDC-NCM driver can require large amounts of memory to create >> skb's and this can be a problem when the memory becomes

RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread David Laight
From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Jim Baxter > Sent: 16 May 2017 18:41 > > The CDC-NCM driver can require large amounts of memory to create > skb's and this can be a problem when the memory becomes fragmented. > > This especially affects

RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-19 Thread David Laight
From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Jim Baxter > Sent: 16 May 2017 18:41 > > The CDC-NCM driver can require large amounts of memory to create > skb's and this can be a problem when the memory becomes fragmented. > > This especially affects

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-18 Thread Oliver Neukum
Am Mittwoch, den 17.05.2017, 14:18 -0400 schrieb David Miller: > From: Bjørn Mork > Date: Tue, 16 May 2017 20:24:10 +0200 > > > Jim Baxter writes: > > > >> The CDC-NCM driver can require large amounts of memory to create > >> skb's and this can be a

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-18 Thread Oliver Neukum
Am Mittwoch, den 17.05.2017, 14:18 -0400 schrieb David Miller: > From: Bjørn Mork > Date: Tue, 16 May 2017 20:24:10 +0200 > > > Jim Baxter writes: > > > >> The CDC-NCM driver can require large amounts of memory to create > >> skb's and this can be a problem when the memory becomes fragmented.

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread David Miller
From: Bjørn Mork Date: Tue, 16 May 2017 20:24:10 +0200 > Jim Baxter writes: > >> The CDC-NCM driver can require large amounts of memory to create >> skb's and this can be a problem when the memory becomes fragmented. >> >> This especially affects embedded

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread David Miller
From: Bjørn Mork Date: Tue, 16 May 2017 20:24:10 +0200 > Jim Baxter writes: > >> The CDC-NCM driver can require large amounts of memory to create >> skb's and this can be a problem when the memory becomes fragmented. >> >> This especially affects embedded systems that have constrained >>

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread Baxter, Jim
From: Oliver Neukum (oneu...@suse.com) Sent: Wed, 17 May 2017 09:44:20 +0200 > Am Dienstag, den 16.05.2017, 20:24 +0200 schrieb Bjørn Mork: >> >> I must say that I don't like the additional complexity added here. If >> there are memory issues and you can reduce the buffer size to >>

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread Baxter, Jim
From: Oliver Neukum (oneu...@suse.com) Sent: Wed, 17 May 2017 09:44:20 +0200 > Am Dienstag, den 16.05.2017, 20:24 +0200 schrieb Bjørn Mork: >> >> I must say that I don't like the additional complexity added here. If >> there are memory issues and you can reduce the buffer size to >>

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread Oliver Neukum
Am Dienstag, den 16.05.2017, 20:24 +0200 schrieb Bjørn Mork: > > I must say that I don't like the additional complexity added here. If > there are memory issues and you can reduce the buffer size to > USB_CDC_NCM_NTB_MIN_OUT_SIZE, then why don't you just set a lower tx_max > buffer size in the

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread Oliver Neukum
Am Dienstag, den 16.05.2017, 20:24 +0200 schrieb Bjørn Mork: > > I must say that I don't like the additional complexity added here. If > there are memory issues and you can reduce the buffer size to > USB_CDC_NCM_NTB_MIN_OUT_SIZE, then why don't you just set a lower tx_max > buffer size in the

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-16 Thread Bjørn Mork
Jim Baxter writes: > The CDC-NCM driver can require large amounts of memory to create > skb's and this can be a problem when the memory becomes fragmented. > > This especially affects embedded systems that have constrained > resources but wish to maximise the throughput of

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-16 Thread Bjørn Mork
Jim Baxter writes: > The CDC-NCM driver can require large amounts of memory to create > skb's and this can be a problem when the memory becomes fragmented. > > This especially affects embedded systems that have constrained > resources but wish to maximise the throughput of CDC-NCM with 16KiB >