linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@conectiva.com.br>
To: Mike Galbraith <mikeg@wen-online.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Derek Glidden <dglidden@illusionary.com>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Please test: workaround to help swapoff behaviour
Date: Thu, 7 Jun 2001 14:43:58 -0300 (BRT)	[thread overview]
Message-ID: <Pine.LNX.4.21.0106071441270.1156-100000@freak.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.21.0106071410090.1156-100000@freak.distro.conectiva>



On Thu, 7 Jun 2001, Marcelo Tosatti wrote:

> 
> On Thu, 7 Jun 2001, Mike Galbraith wrote:
> 
> > On 6 Jun 2001, Eric W. Biederman wrote:
> > 
> > > Mike Galbraith <mikeg@wen-online.de> writes:
> > >
> > > > > If you could confirm this by calling swapoff sometime other than at
> > > > > reboot time.  That might help.  Say by running top on the console.
> > > >
> > > > The thing goes comatose here too. SCHED_RR vmstat doesn't run, console
> > > > switch is nogo...
> > > >
> > > > After running his memory hog, swapoff took 18 seconds.  I hacked a
> > > > bleeder valve for dead swap pages, and it dropped to 4 seconds.. still
> > > > utterly comatose for those 4 seconds though.
> > >
> > > At the top of the while(1) loop in try_to_unuse what happens if you put in.
> > > if (need_resched) schedule();
> > > It should be outside all of the locks.  It might just be a matter of everything
> > > serializing on the SMP locks, and the kernel refusing to preempt itself.
> > 
> > That did it.
> 
> What about including this workaround in the kernel ? 

Well, 

This is for the people who has been experiencing the lockups while running
swapoff.

Please test. (against 2.4.6-pre1)

Thanks for the suggestion, Eric. 


--- linux.orig/mm/swapfile.c	Wed Jun  6 18:16:45 2001
+++ linux/mm/swapfile.c	Thu Jun  7 16:06:11 2001
@@ -345,6 +345,8 @@
 		/*
 		 * Find a swap page in use and read it in.
 		 */
+		if (current->need_resched)
+			schedule();
 		swap_device_lock(si);
 		for (i = 1; i < si->max ; i++) {
 			if (si->swap_map[i] > 0 && si->swap_map[i] != SWAP_MAP_BAD) {


  reply	other threads:[~2001-06-07 19:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-06 15:31 Break 2.4 VM in five easy steps Derek Glidden
2001-06-06 15:46 ` John Alvord
2001-06-06 15:58   ` Derek Glidden
2001-06-06 18:27     ` Eric W. Biederman
2001-06-06 18:47       ` Derek Glidden
2001-06-06 18:52         ` Eric W. Biederman
2001-06-06 19:06           ` Mike Galbraith
2001-06-06 19:28             ` Eric W. Biederman
2001-06-07  4:32               ` Mike Galbraith
2001-06-07  6:38                 ` Eric W. Biederman
2001-06-07  7:28                   ` Mike Galbraith
2001-06-07  7:59                     ` Eric W. Biederman
2001-06-07  8:15                       ` Mike Galbraith
2001-06-07 17:10                 ` Marcelo Tosatti
2001-06-07 17:43                   ` Marcelo Tosatti [this message]
2001-06-06 19:28           ` Derek Glidden
2001-06-09  7:55           ` Rik van Riel
2001-06-06 20:43       ` Daniel Phillips
2001-06-06 21:57       ` LA Walsh
2001-06-07  6:35         ` Eric W. Biederman
2001-06-07 15:25           ` LA Walsh
2001-06-07 16:42             ` Eric W. Biederman
2001-06-07 20:47               ` LA Walsh
2001-06-08 19:38                 ` Pavel Machek
2001-06-09  7:34     ` Rik van Riel
2001-06-06 21:30 ` Alan Cox
2001-06-06 21:57   ` Derek Glidden
2001-06-09  8:09     ` Rik van Riel
2001-06-07 20:33 Please test: workaround to help swapoff behaviour Bulent Abali
2001-06-07 19:40 ` Marcelo Tosatti
2001-06-08 21:11 ` Marcelo Tosatti
2001-06-08 23:53 Bulent Abali
2001-06-09 20:32 Bulent Abali
2001-06-10  2:12 ` Eric W. Biederman
2001-06-10 13:56 Bulent Abali

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.21.0106071441270.1156-100000@freak.distro.conectiva \
    --to=marcelo@conectiva.com.br \
    --cc=dglidden@illusionary.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mikeg@wen-online.de \
    /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;
as well as URLs for NNTP newsgroup(s).