RE: [lc-devel] WKdm to kernel mode
Status: Beta
Brought to you by:
nitin_sf
From: Scott K. <sfk...@am...> - 2006-04-25 12:52:56
|
Nitin,=20 > Currently I have some problem getting timing information=20 > needed to see how much time de/compress() is taking. Can't you turn off power-saving CPU features and use rdtscll()? > Kernel mode stack is only 4k/8k. So, it is not possible to=20 > allocate these temporary buffers (which are about 4k when=20 > shorts are used and about 7k when ints/long are used) on=20 > stack. Good point. > I was just thinking to bring down temp buffers to <4k=20 > so that I can de/allocate single (0 order) page for these buffers. Why not allocate them statically? Then you don't have to do the work of allocating and freeing even these 0-order pages. Even if it is fast, it's going to be frequently repeated work that can easily be avoided. In any case, either approach is going to be better than kmalloc/kfree. > ceil() is now replaced with simple integer operations to get=20 > ceiling value. Nice! Scott |