Messages in this thread | | | Date | Thu, 27 Jan 2000 02:00:39 -0800 | From | "David S. Miller" <> | Subject | Re: buggy GFP_KERNEL allocators |
| |
Date: Thu, 27 Jan 2000 09:57:29 +0100 (CET) From: Andrea Arcangeli <andrea@suse.de>
I think the real fix for 2.2.15pre is this:
I don't know if this is a great idea...
- /* - * If we can schedule, do so, and make sure to yield. - * We may be a real-time process, and if kswapd is - * waiting for us we need to allow it to run a bit. - */ - if (gfp_mask & __GFP_WAIT) { - current->policy |= SCHED_YIELD; - schedule(); - } - nopage: return 0;
Doing such schedule make no sense at all. Each caller should have a fail path that giveups.
Actually there is one place which cannot fail, allocation of the final FIN frame in TCP. It may never fail, it will loop until it gets the memory.
I _know_ this is broken, and I want to fix it in 2.3.x but I cannot safely fix that issue in 2.2.x at all. The issue is that the way things are architected in 2.2.x there is no simple way to retry a FIN later after allocation failure nor forego the FIN altogether. All available failure schemes in that piece of code would result in a dead unkillable socket.
Andrea, please find another way.
Later, David S. Miller davem@redhat.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |