All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: __lock_page calls run_task_queue(&tq_disk) unecessarily?
Date: Tue, 20 Feb 2001 17:00:00 +0100	[thread overview]
Message-ID: <20010220170000.J26544@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.21.0102192051150.3008-100000@freak.distro.conectiva> <Pine.LNX.4.21.0102192302290.3338-100000@freak.distro.conectiva>
In-Reply-To: <Pine.LNX.4.21.0102192302290.3338-100000@freak.distro.conectiva>; from marcelo@conectiva.com.br on Mon, Feb 19, 2001 at 11:05:23PM -0200

On Mon, Feb 19, 2001 at 11:05:23PM -0200, Marcelo Tosatti wrote:
> --- linux/mm/filemap.c.orig     Mon Feb 19 23:51:02 2001
> +++ linux/mm/filemap.c  Mon Feb 19 23:51:33 2001
> @@ -611,11 +611,11 @@
>  
>         add_wait_queue(&page->wait, &wait);
>         do {
> -               sync_page(page);
>                 set_task_state(tsk, TASK_UNINTERRUPTIBLE);
>                 if (!PageLocked(page))
>                         break;
> -               run_task_queue(&tq_disk);
> +
> +               sync_page(page);
>                 schedule();
>         } while (PageLocked(page));
>         tsk->state = TASK_RUNNING;
> @@ -633,10 +633,9 @@
>  
>         add_wait_queue_exclusive(&page->wait, &wait);
>         for (;;) {
> -               sync_page(page);
>                 set_task_state(tsk, TASK_UNINTERRUPTIBLE);
>                 if (PageLocked(page)) {
> -                       run_task_queue(&tq_disk);
> +                       sync_page(page);
>                         schedule();
>                         continue;
			  ^^^^^^^^
>                 }

Looks perfect. I'd also remove the `continue' from __lock_page, it's wake-one
so it should get the wakeup only when it's time to lock the page down.

Andrea

  reply	other threads:[~2001-02-20 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-19 23:02 __lock_page calls run_task_queue(&tq_disk) unecessarily? Marcelo Tosatti
2001-02-20  1:05 ` Marcelo Tosatti
2001-02-20 16:00   ` Andrea Arcangeli [this message]
2001-02-20 17:11     ` Linus Torvalds
2001-02-20 18:10       ` Andrea Arcangeli

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=20010220170000.J26544@athlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.