Messages in this thread | | | Subject | Re: [PATCH -v3 6/8] fsnotify: add group priorities | From | Peter Zijlstra <> | Date | Mon, 01 Dec 2008 16:37:41 +0100 |
| |
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.
| |