lkml.org 
[lkml]   [2001]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: __lock_page calls run_task_queue(&tq_disk) unecessarily?
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.089 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site