mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ohyama_sec@ariel-networks.com
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Can you omit a part of processing of initialization in __pdflush. kernel<2.6.23>.
Date: Sun, 28 Oct 2007 19:09:21 +0900 (JST)	[thread overview]
Message-ID: <20071028100921.DBE3D948007@ns.ariel-networks.com> (raw)

- hiroyasu ohyama

I think it doesn't have to initialize function callback function which is member of pdflush_work discripter twice and It should do that in head of in infinity loop before calling schedule(). Because the latter initialization which is executed at the 143th line of the mm/pdflush.c has done in order to be reused. And I think if it initialize that in the head of loop, the former which is initialized at the 96th line can omit doing that.

---

*** mm/pdflush_bck.c  2007-10-28 15:51:08.000000000 +0900
--- mm/pdflush.c  2007-10-28 15:51:28.000000000 +0900
***************
*** 93,99 ****
  {
    current->flags |= PF_FLUSHER | PF_SWAPWRITE;
    set_freezable();
-   my_work->fn = NULL;
    my_work->who = current;
    INIT_LIST_HEAD(&my_work->list);

--- 93,98 ----
***************
*** 102,107 ****
--- 101,107 ----
    for ( ; ; ) {
      struct pdflush_work *pdf;

+     my_work->fn = NULL;
      set_current_state(TASK_INTERRUPTIBLE);
      list_move(&my_work->list, &pdflush_list);
      my_work->when_i_went_to_sleep = jiffies;
***************
*** 140,146 ****
      }

      spin_lock_irq(&pdflush_lock);
-     my_work->fn = NULL;

      /*
       * Thread destruction: For how long has the sleepiest
--- 140,145 ----


                 reply	other threads:[~2007-10-28 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20071028100921.DBE3D948007@ns.ariel-networks.com \
    --to=ohyama_sec@ariel-networks.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®