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]dose it make get_swap_page(mm/swapfiles.c) good performance ?, kernel<2.6.22.9>.
Date: Sat,  6 Oct 2007 09:04:03 +0900 (JST)	[thread overview]
Message-ID: <20071006000403.DF6E2378020@ns.ariel-networks.com> (raw)

-hiroyasu ohyama

I wonder what corrected attached source makes good performance of 
getting page slot cluster from page area discripter which is written 
"si" in the source codes.
Because I think head of swap_list_t discripter doesn't suggest index of 
swap area which is same priority that swap_list.next but one which is 
the highest priority in the priority's list.
the si->swap_map which have high priority may be chosen by 
get_swap_page(), so that page slot of low priority's swap area may have 
more blank cluster than one of hich priority's swap area.
Then, I think substitute "swap_list.head" for "next" is privent them 
from finding cluster of page slot when "swap_info[next].prio"'s priority 
is different swap_list.next.

---

*** mm/swapfile_bck.c   2007-10-04 12:09:37.000000000 +0900
--- mm/swapfile.c       2007-10-04 12:31:34.000000000 +0900
***************
*** 186,193 ****
       for (type = swap_list.next; type >= 0 && wrapped < 2; type = next) {
               si = swap_info + type;
               next = si->next;
!               if (next < 0 ||
!                   (!wrapped && si->prio != swap_info[next].prio)) {
                       next = swap_list.head;
                       wrapped++;
               }
--- 186,192 ----
       for (type = swap_list.next; type >= 0 && wrapped < 2; type = next) {
               si = swap_info + type;
               next = si->next;
!               if (next < 0) {
                       next = swap_list.head;
                       wrapped++;
               }




             reply	other threads:[~2007-10-06  0:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06  0:04 ohyama_sec [this message]
2007-10-06 15:10 ` Hugh Dickins

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=20071006000403.DF6E2378020@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

Powered by JetHome