lkml.org 
[lkml]   [2008]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -v3 6/8] fsnotify: add group priorities
From
Date
On Mon, 2008-12-01 at 10:20 -0500, Eric Paris wrote:
>
> > I can
> > imagine for many groups and limit range a priority list might be better
> > suited.
>
> talking about plist.h? Since I don't allow 2 groups with the same
> priority I'd say a lot of the plist code would just be overhead (the
> prio list and the node list would be the same)
>
> That's not a big deal since I don't really care about the add/remove
> code paths since they are all notification overhead/setup/teardown. I
> would think that cleaner simpler code would probably be a better idea
> rather than performance for these areas especially since it looks like
> the speed critical parts of plists (list_for_each_entry) would be the
> exact same.
>
> what I don't see is plists being protected by RCU and looking at
> plist_del it doesn't seem like it would be rcu safe. RCU safe plists
> might be a good idea, but for now I think I should just do my own
> priority listing so I don't have to hold a lock while I walk the group
> list (that path is VERY hot)

plist.h provides a 2d structure, where you can iterate the priorities in
constant time no matter how many items of any one priority are enqueued.

Its basically a list of lists.

If as you say, you only have a hand full of items, there is no point.




\
 
 \ /
  Last update: 2008-12-01 16:41    [W:0.083 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site