LWN.net Logo

EPOLL_CTL_DISABLE, epoll, and API design

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 24, 2012 16:30 UTC (Wed) by michaeljt (subscriber, #39183)
Parent article: EPOLL_CTL_DISABLE, epoll, and API design

This should probably have been a comment on the previous article, but I'm not sure if anyone is watching that any more.

I am sure that there is a good reason why it won't work, but couldn't the original problem be solved, in user space, if the user space file descriptor cache included not just a "should be deleted" flag, but also a reference count of threads currently using a file descriptor? Then, before accessing the descriptor, a thread could check the "should be deleted" flag and if it is set decrease the reference count instead of accessing it, freeing the resources if the count reached zero.


(Log in to post comments)

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 25, 2012 0:02 UTC (Thu) by kjp (subscriber, #39639) [Link]

See my comment about 'weak reference' in the comments of the original article. I agree, that this looks fundamentally like a solution in search of a problem.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 25, 2012 21:57 UTC (Thu) by Jandar (subscriber, #85683) [Link]

I had missed this comment in the original article, reading LWN too early has it's disadvantages. There should be a way to step later through unread comments.

The solution using the cookie is simple and elegant. I don't understand the comments about not using the cookie because someone would like to use it otherwise. This line of reason means nobody should use the cookie.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 25, 2012 22:03 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

take a look at https://lwn.net/Comments/unread

it shows you comments for all stories that you haven't read since the last time you viewed that page (and that you haven't read by going to the specific article page)

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 0:21 UTC (Fri) by Jandar (subscriber, #85683) [Link]

Nearly all content of https://lwn.net/Comments/unread I have already seen.

I read LWN in the "One big page" mode and go to the comments (in a new tab) with the "Comments (xxx posted)" button. After I have read the comments for one article I close the tab. Is there something I can do to make Comments/unread more useful?

What I would really like would be some means to hop from one unread comment to the next within the complete comment-section to see the surrounding context. It could be a link at each unread comment pointing to an anchor at the next. E.g. http://lwn.net/Articles/520198/#Comments-UnRead42.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 0:46 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

If you were logged in when you saw those other comments, and still see them on the /unread page, there is a bug that you should send to lwn@lwn.net

However, I suspect that if you go to the unread page again, you will not see all those comment any more and you will find it much more useful.

you should also look at the greasemonkey script for lwn, I think it does more of what you are looking for.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 1:22 UTC (Fri) by Jandar (subscriber, #85683) [Link]

I was logged in while reading this weekly edition. Next week I make a few tests and see if a bug is reproducible.

I use konqueror not firefox but greasemonkey with fancyLWNComments seems to be a reason to switch for reading LWN. Thanks for pointing me to it.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 5:01 UTC (Fri) by dirtyepic (subscriber, #30178) [Link]

What would be really useful is a way to mark an article as watched and have any new comments on it sent by email. Seeing all unread comments is just too much noise for me.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 6:00 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

if you are reading while logged in, you should see that when you revisit an article, new posts show up with an orange border while old posts show up with a grey border.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 26, 2012 17:03 UTC (Fri) by Jandar (subscriber, #85683) [Link]

For me there is no visual difference between old and new comments. In "LWN account customization" there is a setting "Old (seen) comment background color" but this doesn't work, neither in konqueror nor in iceweasel.

Greasemonkeys fancyLWNComments is the first working method to tell read and unread apart.

EPOLL_CTL_DISABLE, epoll, and API design

Posted Oct 27, 2012 2:54 UTC (Sat) by dirtyepic (subscriber, #30178) [Link]

Yep, and that's handy. But I'd like a better way to follow comments than bookmarking individual articles and scanning through the whole list periodically.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds