classzone-VM + mapped pages out of lru_cache
As somebody noticed classzone-18 had a deadlock condition. It was due a silly bug and I fixed it in the new classzone-22:
ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.99-pre7-pre4/classzone-22.gz
This new one also doesn't allow read(2) to see the page that we're going to drop from truncate(2). There are no other changes. It's against 2.3.99-pre7-pre4.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 2 lines · Andrea Arcangeli
As somebody noticed classzone-18 had a deadlock condition. It was due a silly bug and I fixed it in the new classzone-22:
Yes, this fixes the truncate bug here. No problems noticed so far.
Signature · 7 lines
* Jens Axboe <[email protected]> * Linux CD/DVD-ROM, SuSE Labs * http://kernel.dk -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux.eu.org/Linux-MM/
Andrea, please do not pass IRQ state "flags" to another function and try to restore them in this way, it breaks Sparc and any other cpu which keeps "stack frame" state in the flags value. "flags" must be obtained and restored in the same function.
You do this in your rmqueue() changes.
Thanks.
Later,
David S. Miller
[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 4 lines · David S. Miller
Andrea, please do not pass IRQ state "flags" to another function and try to restore them in this way, it breaks Sparc and any other cpu which keeps "stack frame" state in the flags value. "flags" must be obtained and restored in the same function.
On some of the older (obsolete) ARMs, this is also not possible - the IRQ state is restored each time a function exits in kernel mode. (I'm not too concerned with these today).
I've seen this done somewhere else in the kernel as well. How about changing flags to an architecture-defined struct, and doing something like:
extern inline void save_flags(struct flags *flg)
{
#ifdef CATCH_BAD_FLAGS flg->ret = __builtin_return_address(0); #endif __save_flags(flg->flag); }
extern inline void restore_flags(struct flags *flg) {
#ifdef CATCH_BAD_FLAGS if (flg->ret != __builtin_return_address(0)) BUG(); #endif __restore_flags(flg->flag); }
Of course, CATCH_BAD_FLAGS would be turned off for the stable series to reduce the impact of the check, but at least we could catch bad usage on development kernels easily.
Of course, the above is dependent on __builtin_return_address() returning the return address of the function that these were inlined into.
I'm just wondering - what about spinlocks? There are a couple of instances where a spinlock is taken in a parent function and temporarily released in one of its child functions. I'm not happy with this usage, but if this is a legal usage of the spinlocks, then the above may bite when it shouldn't.
_____
|_____| ------------------------------------------------- ---+---+- | | Russell King [email protected] --- --- | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / | | +-+-+ --- -+- / | THE developer of ARM Linux |+| /|\ / | | | --- | +-+-+ ------------------------------------------------- /\\\ |
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 4 lines · David S. Miller
Andrea, please do not pass IRQ state "flags" to another function and try to restore them in this way, it breaks Sparc and any other cpu which keeps "stack frame" state in the flags value. "flags" must be obtained and restored in the same function.
Ok, thanks. Probably it worth to add a comment about this also in reschedule_idle.
Fix is the same as in reschedule_idle, make rmqueue inline.
Thanks.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
New classzone patch for 2.3.99-pre7-pre6 is here:
ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.99-pre7-pre6/classzone-24.gz
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/