Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281605
| From | Pavel Fedin <p.fedin@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 3/6] net: thunderx: Increase transmit queue length |
| Date | 2015-12-02 11:40 +0100 |
| Message-ID | <qBcZj-5WX-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qAPgm-7I5-33@gated-at.bofh.it> <qAUpH-2rO-9@gated-at.bofh.it> <qAVc6-30Q-13@gated-at.bofh.it> <qAW8a-3BH-11@gated-at.bofh.it> <qBbAd-59b-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello! > > Probably you might have to set "coherent_pool" size in bootargs to a > > higher value. > > Can you please check. > > I have tried to do this. I was able to enlarge the pool up to 4MB, and still got allocation > failures. At 8MB pool preallocation stops working: > --- cut --- > Call trace: > [<ffffffc00012ddb8>] __alloc_pages_nodemask+0x4f4/0x7d4 > [<ffffffc0007be370>] atomic_pool_init+0x60/0x1a4 > [<ffffffc0007be4d4>] arm64_dma_init+0x20/0x28 > [<ffffffc000082848>] do_one_initcall+0x8c/0x1a4 > [<ffffffc0007baac0>] kernel_init_freeable+0x154/0x1f4 > [<ffffffc0005c2b14>] kernel_init+0x10/0xd8 > DMA: failed to allocate 8192 KiB pool for atomic coherent allocation > --- cut --- > and i get even worse faults in the driver. > > I know that it is possible to allocate larger pools by setting CONFIG_FORCE_MAX_ZONEORDER, > but: > a) This is done on per-platform basis. For ThunderX we used to have a patch > (http://www.spinics.net/lists/arm-kernel/msg415457.html), which never made it upstream, > because vGIC fixes stopped requiring it at some point. And also we may want to use the nicvf > driver not only on actual hardware, but also inside virtual machine in KVM. So do we need to > set CONFIG_FORCE_MAX_ZONEORDER for virt too? And what if at some point qemu emulates not only > "virt", but some other machine (let's say AMD X-Gene), and we run it on ThunderX and want to > use nicvf with this model? > b) IMHO it's not good to have a driver which simply does not work without some obscure option > in boot arguments. > > So, i see several possible ways to solve this: > > 1. Introduce some mechanism which would allow the driver to tell the kernel that it needs > coherent pool of large size. Can be problematic because the driver can be a module, and pool > allocation happens early. > 2. Can we use some other method for allocating queues, which would not require such a huge > coherent pool? > 3. The driver could check value of atomic_pool_size and adjust own memory requirements > accordingly. This indeed looks like a quick hack, but would at least make things running > quickly. I have also noticed that CONFIG_DMA_CMA is turned off in my kernel. I guess it was a leftover from old defconfig, because i carry over my .config from version to version. I enabled it and rebuilt the kernel, but in order to get the driver working with this patch i had to also add cma=32M option to kernel arguments. With default of 16M the allocation still fails. Should we add Kconfig dependencies? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/6] net: thunderx: Increase transmit queue length Sunil Goutham <sunil.kovvuri@gmail.com> - 2015-12-01 10:20 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-01 15:50 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-01 16:40 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2015-12-01 17:40 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length David Miller <davem@davemloft.net> - 2015-12-01 20:40 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2015-12-02 06:50 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-02 14:30 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-02 18:00 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2015-12-02 18:00 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length David Miller <davem@davemloft.net> - 2015-12-02 18:40 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-02 10:10 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-02 11:40 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-02 13:30 +0100
Re: [PATCH 3/6] net: thunderx: Increase transmit queue length Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2015-12-02 14:00 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-02 14:30 +0100
RE: [PATCH 3/6] net: thunderx: Increase transmit queue length Pavel Fedin <p.fedin@samsung.com> - 2015-12-02 09:10 +0100
csiph-web