[linux-mm-cc] Hi All
IKEDA, Munehiro
m-ikeda at ds.jp.nec.com
Tue Sep 25 21:59:22 EDT 2007
Hi all,
Nitin Gupta wrote:
>> 4) It decompresses page in context where we cannot sleep in general (like
>> in
>>> find_get_page() and friends). This is a serious drawback since we need
>> to
>>> allocate some temporary memory in decompression path also which we
>> cannot
>>> allow to sleep and thus has very high chances of failing - If
>> decompression
>>> path fails, we loose data and what not!
>> Why cannot we sleep? The context is basically same as swap-in, which
>> may sleep the context.
>> In fact, my patch can make the context sleep and works well.
>
>
> I don't really remember what exactly failed when trying to sleep while
> decompressing. But you can easily find that out - in cc_readpage() do:
>
> - comp_page = alloc_page(GFP_ATOMIC);
> + comp_page = alloc_page(GFP_KERNEL);
>
> and you will see kernel panic/oops because you are sleeping in wrong
> context. Basically, we cannot determine in find_get_page() and friends as to
> whether we can sleep or not.
I guess it was caused by bit_spin_trylock() in handle_ccache_fault().
bit_spin_trylock() disables preempt so the context cannot sleep between
lock and unlock. As the result of it, alloc_pages() which is called
from cc_readpage(), which is called from handle_ccache_fault(), cannot
sleep.
If we want to sleep, we have to unlock before schedule and try to lock
again after waken up.
Or, use bitlock like lock_page().
(I made a patch for it but not evaluated the performance hit)
> --------------
> Are you interested in the new implementation which is now under design?
> Probably, we can all meet up on IRC and discuss new plan?
> For all interested in this, please let me know time suitable for you (with
> time zone)
>
> For me: 9:00 am (GMT +5:30) on 25/9 works.
> We can have 1/2-1 hour discussion.
>
> If things go well, we can have weekly 15 mins sessions on IRC to discuss
> status and this will help us stay on track.
You mean 26/9?
I'm interested in it and want to discuss with you but unfortunately my
network is behind damn firewall and I cannot use IRC now. Sigh.
> Cheers,
> Nitin
Best regards,
IKEDA, Munehiro
More information about the linux-mm-cc
mailing list