[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __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 _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: References: