From: Linus Torvalds <torvalds@transmeta.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Rik van Riel <riel@nl.linux.org>, Bernd Kaindl <bk@suse.de>,
Linux Kernel <linux-kernel@vger.rutgers.edu>,
kernel@suse.de, linux-mm@kvack.org, Alan Cox <alan@redhat.com>
Subject: Re: [patch] fix for OOM deadlock in swap_in (2.2.10) [Re: [test program] for OOM situations ]
Date: Sun, 4 Jul 1999 10:49:56 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.10.9907041041100.1352-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.10.9907041920040.6789-100000@laser.random>
On Sun, 4 Jul 1999, Andrea Arcangeli wrote:
>
> The first patch I sent you some time ago was buggy since I replaced the
> sigbus with a sigkill in do_page_fault, but now I force the signals only
> at the lower level (as shm and other places was just doing) and the retval
> of handle_mm_fault now _only_ tells do_page_fault if it has to fixup or
> not.
Ok. I still have your old patch, I'll just flush it so I don't confuse it
with anything else.
However, I still much prefer the 2.3.x approach (ie just returning more
than just 0/1 - a negative number means out-of-memory). In particular,
your current approach gets the ptrace() case wrong for the SIGBUS case,
and it's pretty much impossible to fix cleanly as far as I can tell.
Note that 2.3.10-pre2 also gets ptrace() wrong, but at least it's not
impossible to fix - it should just bother to check the return value it
gets from handle_mm_fault(). Right now it doesn't.
Note that ptrace() is a horrible special case, being the only thing that
accesses another process VM space (apart from vmscan which is also
horrible, in other ways). HOWEVER, it's rather bad to have a SIGBUS
problem and then when you try to debug it the debugger also gets a SIGBUS,
which is what your approach results in.
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-07-04 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.10.9907010152410.17156-100000@Wotan.suse.de>
1999-07-03 13:52 ` Andrea Arcangeli
1999-07-04 9:48 ` Rik van Riel
1999-07-04 14:35 ` Andrea Arcangeli
1999-07-04 17:11 ` Linus Torvalds
1999-07-04 17:38 ` Andrea Arcangeli
1999-07-04 17:49 ` Linus Torvalds [this message]
1999-07-04 20:15 ` Andrea Arcangeli
1999-07-04 20:32 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.9907041041100.1352-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=alan@redhat.com \
--cc=andrea@suse.de \
--cc=bk@suse.de \
--cc=kernel@suse.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=riel@nl.linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox