public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ying Chen/Almaden/IBM" <ying@almaden.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: test11-pre6
Date: Thu, 16 Nov 2000 19:02:25 -0800	[thread overview]
Message-ID: <OFF5BA802C.5845C1FB-ON8825699A.00106748@LocalDomain> (raw)


Linus,

You forgot about wakeup_bdflush(1) stuff.

Here is the patch again (against test10).
===============================================================
There are several places where schedule() is called after wakeup_bdflush(1)
is called. This is completely unnecessary, since wakeup_bdflush(1) already
gave up the control, and when the control is returned to the calling thread
who called wakeup_bdflush(1), it should just go on. Calling schedule()
after wakeup_bdflush(1) will make the calling thread give up control again.
This is a problem for some of those latency sensitive benchmarks (like SPEC
SFS) and applications.

============
diff -ruN mm.orig/highmem.c mm.opt/highmem.c
--- mm.orig/highmem.c   Wed Oct 18 14:25:46 2000
+++ mm.opt/highmem.c    Fri Nov 10 17:51:39 2000
@@ -310,8 +310,6 @@
    bh = kmem_cache_alloc(bh_cachep, SLAB_BUFFER);
    if (!bh) {
        wakeup_bdflush(1);  /* Sets task->state to TASK_RUNNING */
-       current->policy |= SCHED_YIELD;
-       schedule();
        goto repeat_bh;
    }
    /*
@@ -324,8 +322,6 @@
    page = alloc_page(GFP_BUFFER);
    if (!page) {
        wakeup_bdflush(1);  /* Sets task->state to TASK_RUNNING */
-       current->policy |= SCHED_YIELD;
-       schedule();
        goto repeat_page;
    }
    set_bh_page(bh, page, 0);
diff -ruN fs.orig/buffer.c fs.opt/buffer.c
--- fs.orig/buffer.c    Thu Oct 12 14:19:32 2000
+++ fs.opt/buffer.c Fri Nov 10 20:05:44 2000
@@ -707,11 +707,8 @@
  */
 static void refill_freelist(int size)
 {
-   if (!grow_buffers(size)) {
+   if (!grow_buffers(size))
        wakeup_bdflush(1);  /* Sets task->state to TASK_RUNNING */
-       current->policy |= SCHED_YIELD;
-       schedule();
-   }
 }

 void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void
*private)
==============================


Ying Chen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2000-11-17  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-17  3:02 Ying Chen/Almaden/IBM [this message]
2000-11-17  3:09 ` test11-pre6 David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2000-11-17  2:33 test11-pre6 Linus Torvalds
2000-11-17  3:45 ` test11-pre6 Jeff V. Merkey
2000-11-17  7:30   ` test11-pre6 Erik Andersen
2000-11-17  8:30     ` test11-pre6 David Lang
2000-11-17  8:53     ` test11-pre6 Jeff V. Merkey
2000-11-17 16:11     ` test11-pre6 Mike A. Harris
2000-11-17  7:33 ` test11-pre6 Chris Wedgwood
2000-11-17 11:57   ` test11-pre6 Jeff Garzik
2000-11-17 10:37 ` test11-pre6 David Woodhouse

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=OFF5BA802C.5845C1FB-ON8825699A.00106748@LocalDomain \
    --to=ying@almaden.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox