Messages in this thread | | | Date | Tue, 17 Nov 2009 03:43:12 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH 04/21] sched: implement scheduler notifiers |
| |
Hello,
Avi Kivity wrote: > Four hlist_heads (64 bytes) is pretty heavy for this.
hlist_head is one pointer, so it will be 32bytes on 64bit machines.
> I having all members present in sched_notifier (instead of a union) > and calling a callback if it is not NULL. This reduces the overhead > to 16 bytes at the expense of an extra check for sched_notifier > users.
And it will reduce the overhead to 8 bytes. Anyways, Linus was against walking the list multiple times for different callbacks and the way kvm uses these notifiers doesn't work very well with allocating separate table on demand, so I just went with four pointers. Given that these notifiers are quite unpopular yet, I lean toward Avi's suggestion. Linus?
> Besides this, is there any difference to preempt_notifiers? if not we > can just add the new members and rename.
Yeap, if we're gonna add things to ops table, I agree that would be better.
Thanks.
-- tejun
| |