Re: [lc-devel] WKdm to kernel mode
Status: Beta
Brought to you by:
nitin_sf
From: Nitin G. <nit...@gm...> - 2006-04-27 12:31:46
|
Hi, Flávio Etrusco wrote: > > - maybe this serialization is not that bad? What order of time is > compress() expected to take? I haven't yet measured how much time compress() actually takes (I expect an order of few 100 ns for WKdm). But even if WKdm is fast, I don't expect LZO to be fast enough to be serialized. But then we can keep WKdm serialized and LZO kmalloc()ed. I am not sure of any single solution which will be good for systems of different speeds. Maybe, maybe we are overestimating cost of kmalloc()s...I don't know. Anyway both these methods are worth proper benchmarks -- maybe then we'll be able to see. > - if the system is low on (free) RAM, isn't using kmalloc likely to > double the pages to swap out? If system is so low on memory that it can't even allocate few KBs without swapping then ccache better start freeing pages :) It should be allowed to add pages only when free RAM space is above certain threshold. > - are you sure you're not neglecting the overhead of kmalloc? > I am not sure if kmalloc overhead is negligible or not compared to serialization. Also, which one of these should be faster: kmalloc(sizeof(WK_word)*300, GFP_KERNEL); kmalloc(sizeof(WK_word)*300, GFP_KERNEL); kmalloc(sizeof(unsigned short)*1200, GFP_KERNEL); or, single kmalloc allocating sum of above three spaces ? Cheers, Nitin |