Re: [PATCH] epoll: trim epitem by one cache line on x86_64

2013-03-08 Thread Andrew Morton
On Thu, 7 Mar 2013 10:32:40 + Eric Wong wrote: > Andrew Morton wrote: > > It's going to be hard to maintain this - someone will change something > > sometime and break it. I suppose we could add a runtime check if we > > cared enough. Adding a big fat comment to struct epitem might help. >

Re: [PATCH] epoll: trim epitem by one cache line on x86_64

2013-03-07 Thread Eric Wong
Andrew Morton wrote: > It's going to be hard to maintain this - someone will change something > sometime and break it. I suppose we could add a runtime check if we > cared enough. Adding a big fat comment to struct epitem might help. Thanks for looking at this patch. I'll send a patch with a c

Re: [PATCH] epoll: trim epitem by one cache line on x86_64

2013-03-06 Thread Andrew Morton
On Mon, 4 Mar 2013 11:29:41 + Eric Wong wrote: > It is common for epoll users to have thousands of epitems, so saving a > cache line on every allocation leads to large memory savings. > > Since epitem allocations are cache-aligned, reducing sizeof(struct > epitem) from 136 bytes to 128 bytes