* 2.2.15pre4 VM fix
@ 2000-01-26 0:20 Rik van Riel
2000-01-28 12:09 ` Ivan Kokshaysky
0 siblings, 1 reply; 6+ messages in thread
From: Rik van Riel @ 2000-01-26 0:20 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux MM, Linux Kernel
Hi Alan,
with the attached patch I hope to have fixed the 2.2.15pre4
VM problems. I didn't manage to break it myself, but maybe
one of the dear readers has a machine where they are able
to do so...
Please give this patch (against 2.2.15pre4) a solid beating
and report back to us. Thanks all!
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
--- mm/page_alloc.c.orig Tue Jan 25 00:01:43 2000
+++ mm/page_alloc.c Wed Jan 26 01:16:21 2000
@@ -210,6 +210,12 @@
*/
if (!(current->flags & PF_MEMALLOC)) {
int freed;
+ if (current->state != TASK_RUNNING && (gfp_mask & __GFP_WAIT)) {
+ printk("gfp called by non-running (%d) task from %p!\n",
+ current->state, __builtin_return_address(0));
+ /* if we're not running, we can't sleep */
+ gfp_mask &= ~__GFP_WAIT;
+ }
if (nr_free_pages <= freepages.low) {
wake_up_interruptible(&kswapd_wait);
@@ -224,6 +230,9 @@
current->flags |= PF_MEMALLOC;
freed = try_to_free_pages(gfp_mask);
current->flags &= ~PF_MEMALLOC;
+
+ if ((gfp_mask & __GFP_MED) && nr_free_pages > freepages.min / 2)
+ goto ok_to_allocate;
if (!freed && !(gfp_mask & __GFP_HIGH))
goto nopage;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: 2.2.15pre4 VM fix
2000-01-26 0:20 2.2.15pre4 VM fix Rik van Riel
@ 2000-01-28 12:09 ` Ivan Kokshaysky
2000-01-28 14:40 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Ivan Kokshaysky @ 2000-01-28 12:09 UTC (permalink / raw)
To: Rik van Riel; +Cc: Alan Cox, Linux MM, Linux Kernel
On Wed, Jan 26, 2000 at 01:20:48AM +0100, Rik van Riel wrote:
>
> Please give this patch (against 2.2.15pre4) a solid beating
> and report back to us. Thanks all!
>
n_tty_open() has been caught with your patch.
Thanks!
Ivan.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.2.15pre4 VM fix
2000-01-28 12:09 ` Ivan Kokshaysky
@ 2000-01-28 14:40 ` Alan Cox
2000-01-28 16:29 ` Theodore Y. Ts'o
2000-01-28 16:48 ` Ivan Kokshaysky
0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2000-01-28 14:40 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Rik van Riel, Alan Cox, Linux MM, Linux Kernel
> > Please give this patch (against 2.2.15pre4) a solid beating
> > and report back to us. Thanks all!
>
> n_tty_open() has been caught with your patch.
> Thanks!
Do you know which drivers (serial,tty) you were using it. n_tty_open itself
seems ok, but the caller may be guilty
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.2.15pre4 VM fix
2000-01-28 14:40 ` Alan Cox
@ 2000-01-28 16:29 ` Theodore Y. Ts'o
2000-01-28 16:48 ` Ivan Kokshaysky
1 sibling, 0 replies; 6+ messages in thread
From: Theodore Y. Ts'o @ 2000-01-28 16:29 UTC (permalink / raw)
To: Alan Cox; +Cc: ink, riel, linux-mm, linux-kernel
> > Please give this patch (against 2.2.15pre4) a solid beating
> > and report back to us. Thanks all!
>
> n_tty_open() has been caught with your patch.
> Thanks!
Do you know which drivers (serial,tty) you were using it. n_tty_open itself
seems ok, but the caller may be guilty
The drivers don't call the line discpline open routine. That honor is
reserved to the high-level tty layer --- see tty_set_ldisc in tty_io.c
- Ted
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.2.15pre4 VM fix
2000-01-28 14:40 ` Alan Cox
2000-01-28 16:29 ` Theodore Y. Ts'o
@ 2000-01-28 16:48 ` Ivan Kokshaysky
2000-01-28 17:26 ` Theodore Y. Ts'o
1 sibling, 1 reply; 6+ messages in thread
From: Ivan Kokshaysky @ 2000-01-28 16:48 UTC (permalink / raw)
To: Alan Cox; +Cc: Rik van Riel, Linux MM, Linux Kernel
On Fri, Jan 28, 2000 at 02:40:30PM +0000, Alan Cox wrote:
> > n_tty_open() has been caught with your patch.
> > Thanks!
>
> Do you know which drivers (serial,tty) you were using it. n_tty_open itself
> seems ok, but the caller may be guilty
It happened when ppp connection was terminated (remote end hangup).
Serial driver is Comtrol Rocketport. The problem is repeatable
(3 times last 20 hours), so I can investigate further to see who
is the caller.
Ivan.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.2.15pre4 VM fix
2000-01-28 16:48 ` Ivan Kokshaysky
@ 2000-01-28 17:26 ` Theodore Y. Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Y. Ts'o @ 2000-01-28 17:26 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Alan Cox, Rik van Riel, Linux MM, Linux Kernel
On Fri, Jan 28, 2000 at 02:40:30PM +0000, Alan Cox wrote:
> > n_tty_open() has been caught with your patch.
> > Thanks!
>
> Do you know which drivers (serial,tty) you were using it. n_tty_open itself
> seems ok, but the caller may be guilty
It happened when ppp connection was terminated (remote end hangup).
Serial driver is Comtrol Rocketport. The problem is repeatable
(3 times last 20 hours), so I can investigate further to see who
is the caller.
I think it's a flase positive. It's happeninig because tty_do_hangup()
is calling ldisc.open --- which means n_tty_open() inside an interrupt
context. n_tty_open() makes a check to see whether it is being called
inside an interrupt, and uses GFP_ATOMIC to avoid blocking inside the
interrupt.
static int n_tty_open(struct tty_struct *tty)
{
....
get_zeroed_page(in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
...
}
This should be OK, I think.
- Ted
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-01-28 17:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-26 0:20 2.2.15pre4 VM fix Rik van Riel
2000-01-28 12:09 ` Ivan Kokshaysky
2000-01-28 14:40 ` Alan Cox
2000-01-28 16:29 ` Theodore Y. Ts'o
2000-01-28 16:48 ` Ivan Kokshaysky
2000-01-28 17:26 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox