Re: [PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-11-01 Thread Paton J. Lewis
On 10/31/12 5:43 PM, Michael Wang wrote: On 11/01/2012 02:57 AM, Paton J. Lewis wrote: On 10/30/12 11:32 PM, Michael Wang wrote: On 10/26/2012 08:08 AM, Paton J. Lewis wrote: From: "Paton J. Lewis" It is not currently possible to reliably delete epoll items when using the same

Re: [PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-11-01 Thread Paton J. Lewis
On 10/31/12 5:43 PM, Michael Wang wrote: On 11/01/2012 02:57 AM, Paton J. Lewis wrote: On 10/30/12 11:32 PM, Michael Wang wrote: On 10/26/2012 08:08 AM, Paton J. Lewis wrote: From: Paton J. Lewis pale...@adobe.com It is not currently possible to reliably delete epoll items when using

Re: [PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-10-31 Thread Paton J. Lewis
On 10/30/12 11:32 PM, Michael Wang wrote: On 10/26/2012 08:08 AM, Paton J. Lewis wrote: From: "Paton J. Lewis" It is not currently possible to reliably delete epoll items when using the same epoll set from multiple threads. After calling epoll_ctl with EPOLL_CTL_DEL, another th

Re: [PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-10-31 Thread Paton J. Lewis
On 10/30/12 11:32 PM, Michael Wang wrote: On 10/26/2012 08:08 AM, Paton J. Lewis wrote: From: Paton J. Lewis pale...@adobe.com It is not currently possible to reliably delete epoll items when using the same epoll set from multiple threads. After calling epoll_ctl with EPOLL_CTL_DEL, another

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
On 10/23/12 12:15 PM, Andreas Jaeger wrote: On 10/23/2012 07:23 PM, Paton J. Lewis wrote: [Re-sending without HTML formatting; all vger.kernel.org destination addresses bounced my original response.] On 10/16/12 8:12 AM, Michael Kerrisk (man-pages) wrote: [CC += linux-api@] Thank you

[PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
From: "Paton J. Lewis" It is not currently possible to reliably delete epoll items when using the same epoll set from multiple threads. After calling epoll_ctl with EPOLL_CTL_DEL, another thread might still be executing code related to an event for that epoll item (in response to

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
On 10/25/12 3:23 AM, Michael Kerrisk (man-pages) wrote: Hi Pat, I suppose that I have a concern that goes in the other direction. Is there not some other solution possible that doesn't require the use of EPOLLONESHOT? It seems overly restrictive to require that the caller must employ this

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
On 10/25/12 3:23 AM, Michael Kerrisk (man-pages) wrote: Hi Pat, I suppose that I have a concern that goes in the other direction. Is there not some other solution possible that doesn't require the use of EPOLLONESHOT? It seems overly restrictive to require that the caller must employ this

[PATCH v3] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
From: Paton J. Lewis pale...@adobe.com It is not currently possible to reliably delete epoll items when using the same epoll set from multiple threads. After calling epoll_ctl with EPOLL_CTL_DEL, another thread might still be executing code related to an event for that epoll item (in response

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-25 Thread Paton J. Lewis
On 10/23/12 12:15 PM, Andreas Jaeger wrote: On 10/23/2012 07:23 PM, Paton J. Lewis wrote: [Re-sending without HTML formatting; all vger.kernel.org destination addresses bounced my original response.] On 10/16/12 8:12 AM, Michael Kerrisk (man-pages) wrote: [CC += linux-api@] Thank you

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-23 Thread Paton J. Lewis
On 10/23/12 6:26 AM, Michael Kerrisk (man-pages) wrote: On 10/23/12 10:23 AM, Paton J. Lewis wrote: [Re-sending without HTML formatting; all vger.kernel.org destination addresses bounced my original response.] On 10/16/12 8:12 AM, Michael Kerrisk (man-pages) wrote: [CC += linux-api@] Thank

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-23 Thread Paton J. Lewis
Paton, On Thu, Aug 23, 2012 at 11:15 PM, Paton J. Lewis wrote: From: "Paton J. Lewis" Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll item. If epoll_ctl doesn't return -EBUSY in this case, it is then safe to delete the epoll item in a multi-threaded environ

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-23 Thread Paton J. Lewis
Paton, On Thu, Aug 23, 2012 at 11:15 PM, Paton J. Lewis pale...@adobe.com wrote: From: Paton J. Lewis pale...@adobe.com Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll item. If epoll_ctl doesn't return -EBUSY in this case, it is then safe to delete the epoll item

Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-23 Thread Paton J. Lewis
On 10/23/12 6:26 AM, Michael Kerrisk (man-pages) wrote: On 10/23/12 10:23 AM, Paton J. Lewis wrote: [Re-sending without HTML formatting; all vger.kernel.org destination addresses bounced my original response.] On 10/16/12 8:12 AM, Michael Kerrisk (man-pages) wrote: [CC += linux-api@] Thank

[PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-08-23 Thread Paton J. Lewis
From: "Paton J. Lewis" Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll item. If epoll_ctl doesn't return -EBUSY in this case, it is then safe to delete the epoll item in a multi-threaded environment. Also added a new test_epoll self- test app to both demonstrat

[PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-08-23 Thread Paton J. Lewis
From: Paton J. Lewis pale...@adobe.com Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll item. If epoll_ctl doesn't return -EBUSY in this case, it is then safe to delete the epoll item in a multi-threaded environment. Also added a new test_epoll self- test app to both

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Paton J. Lewis
At 8/14/2012 01:21 PM, Christof Meerwald wrote: Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] > My first concern is about code clarity. Using a custom event to > delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item > requires that func

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Paton J. Lewis
At 8/14/2012 01:21 PM, Christof Meerwald wrote: Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] My first concern is about code clarity. Using a custom event to delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item requires that functionality

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-02 Thread Paton J. Lewis
implementing what is actually needed, I would argue for sticking with the original EPOLL_CTL_DISABLE proposal for now. Pat At 6/29/2012 02:43 PM, Paton J. Lewis wrote: At 6/19/2012 11:17 AM, Christof Meerwald wrote: Hi Paton, On Mon, Jun 18, 2012 at 04:24:35PM -0700, Paton J. Lewis wrote: > We beli

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-02 Thread Paton J. Lewis
implementing what is actually needed, I would argue for sticking with the original EPOLL_CTL_DISABLE proposal for now. Pat At 6/29/2012 02:43 PM, Paton J. Lewis wrote: At 6/19/2012 11:17 AM, Christof Meerwald wrote: Hi Paton, On Mon, Jun 18, 2012 at 04:24:35PM -0700, Paton J. Lewis wrote: We believe