lkml.org 
[lkml]   [2020]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHSET] epoll cleanups
On Sun, Oct 04, 2020 at 01:13:29PM +0100, Matthew Wilcox wrote:

> Have you considered just storing a pointer to each struct file in an
> epoll set in an XArray? Linked lists suck for modern CPUs, and there'd
> be no need to store any additional data in each struct file. Using
> xa_alloc() to store the pointer and throw away the index the pointer
> got stored at would leave you with something approximating a singly
> linked list, except it's an array. Which does zero memory allocations
> for a single entry and will then allocate a single node for your first
> 64 entries.

Won't work - those struct file can get freed while we are collecting the
set/allocating epitem/calling ->poll()/etc.

\
 
 \ /
  Last update: 2020-10-04 16:17    [W:0.146 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site