Re: [PATCH v3 05/13] epoll: offload polling to a work in case of epfd polled from userspace

2019-05-22 Thread Roman Penyaev
On 2019-05-21 09:51, Eric Wong wrote: Roman Penyaev wrote: diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 81da4571f1e0..9d3905c0afbf 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -44,6 +44,7 @@ #include #include #include +#include #include /* @@ -185,6 +186,9 @@ struct

Re: [PATCH v3 05/13] epoll: offload polling to a work in case of epfd polled from userspace

2019-05-21 Thread Eric Wong
Roman Penyaev wrote: > diff --git a/fs/eventpoll.c b/fs/eventpoll.c > index 81da4571f1e0..9d3905c0afbf 100644 > --- a/fs/eventpoll.c > +++ b/fs/eventpoll.c > @@ -44,6 +44,7 @@ > #include > #include > #include > +#include > #include > > /* > @@ -185,6 +186,9 @@ struct epitem { > >

[PATCH v3 05/13] epoll: offload polling to a work in case of epfd polled from userspace

2019-05-16 Thread Roman Penyaev
Not every device reports pollflags on wake_up(), expecting that it will be polled later. vfs_poll() can't be called from ep_poll_callback(), because ep_poll_callback() is called under the spinlock. Obviously userspace can't call vfs_poll(), thus epoll has to offload vfs_poll() to a work and then