Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 08:35:01PM +0800, Liang Chen wrote: > On Fri, May 26, 2023 at 2:51 PM Jason Wang wrote: > > > > On Fri, May 26, 2023 at 1:46 PM Liang Chen > > wrote: > > > > > > The implementation at the moment uses one page per packet in both the > > > normal and XDP path. > > > > It's

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 02:38:54PM +0800, Jason Wang wrote: > On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > > > "private" of buffer page is currently used for big mode to chain pages. > > But in mergeable mode, that offset of page could mean something else, > > e.g. when page_pool page is

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 12:11:25AM +0800, kernel test robot wrote: > Hi Liang, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Liang-Chen/virtio_net-Add-page_pool-support-to-impro

Re: [PATCH net-next 3/5] virtio_net: Add page pool fragmentation support

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:19PM +0800, Liang Chen wrote: > To further enhance performance, implement page pool fragmentation > support and introduce a module parameter to enable or disable it. > > In single-core vm testing environments, there is an additional performance > gain observed in the

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:18PM +0800, Liang Chen wrote: > The implementation at the moment uses one page per packet in both the > normal and XDP path. In addition, introducing a module parameter to enable > or disable the usage of page pool (disabled by default). > > In single-core vm testing

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:17PM +0800, Liang Chen wrote: > "private" of buffer page is currently used for big mode to chain pages. > But in mergeable mode, that offset of page could mean something else, > e.g. when page_pool page is used instead. So excluding mergeable mode to > avoid such a pro

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-27 Thread Eric W. Biederman
Mike Christie writes: > On 5/23/23 7:15 AM, Oleg Nesterov wrote: >> >> Now the main question. Whatever we do, SIGKILL/SIGSTOP/etc can come right >> before we call work->fn(). Is it "safe" to run this callback with >> signal_pending() or fatal_signal_pending() ? > > The questions before this one

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-27 Thread Linus Torvalds
On Sat, May 27, 2023 at 6:17 PM Eric W. Biederman wrote: > > It seems like a good approach for including in the -rc series. > I think the change should look more like my change below. I have no objections. My patch was a fairly "hack and slash" thing to just disassociate the IO workers entirely f

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-27 Thread Eric W. Biederman
Linus Torvalds writes: > On Sat, May 27, 2023 at 2:49 AM Eric W. Biederman > wrote: >> >> The real sticky widget for me is how to handle one of these processes >> coredumping. It really looks like it will result in a reliable hang. > > Well, if *that* is the main worry, I think that's trivial

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-27 Thread Linus Torvalds
On Sat, May 27, 2023 at 2:49 AM Eric W. Biederman wrote: > > The real sticky widget for me is how to handle one of these processes > coredumping. It really looks like it will result in a reliable hang. Well, if *that* is the main worry, I think that's trivial enough to deal with. In particular,

Re: [PATCH net-next 3/5] virtio_net: Add page pool fragmentation support

2023-05-27 Thread Liang Chen
On Fri, May 26, 2023 at 4:29 PM Horatiu Vultur wrote: > > The 05/26/2023 13:46, Liang Chen wrote: > > Hi Liang, > > > > > To further enhance performance, implement page pool fragmentation > > support and introduce a module parameter to enable or disable it. > > > > In single-core vm testing enviro

Re: [PATCH net-next 5/5] virtio_net: Implement DMA pre-handler

2023-05-27 Thread Liang Chen
On Fri, May 26, 2023 at 3:06 PM Jason Wang wrote: > > On Fri, May 26, 2023 at 1:47 PM Liang Chen wrote: > > > > Adding a DMA pre-handler that utilizes page pool for managing DMA mappings. > > When IOMMU is enabled, turning on the page_pool_dma_map module parameter to > > select page pool for DMA

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Liang Chen
On Fri, May 26, 2023 at 2:51 PM Jason Wang wrote: > > On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > > > The implementation at the moment uses one page per packet in both the > > normal and XDP path. > > It's better to explain why we need a page pool and how it can help the > performance.

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-27 Thread Liang Chen
On Fri, May 26, 2023 at 2:39 PM Jason Wang wrote: > > On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > > > "private" of buffer page is currently used for big mode to chain pages. > > But in mergeable mode, that offset of page could mean something else, > > e.g. when page_pool page is used in

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-27 Thread Eric W. Biederman
Linus Torvalds writes: > So I'd really like to finish this. Even if we end up with a hack or > two in signal handling that we can hopefully fix up later by having > vhost fix up some of its current assumptions. The real sticky widget for me is how to handle one of these processes coredumping.