public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.com>
To: LinuxIA64 <linux-ia64@vger.kernel.org>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [RFC/PATCH]  pfn_valid() more generic : intro[0/2]
Date: Wed, 06 Oct 2004 06:20:56 +0000	[thread overview]
Message-ID: <41638EC8.9090901@jp.fujitsu.com> (raw)

Hi,

ia64's ia64_pfn_valid() uses get_user() for checking whether a page struct
is available or not. I think this is an irregular implementation and following patches
are a more generic replacement, careful_pfn_valid(). It uses 2 level table.

Core Algorithm
==
1st level, pfn_validmap[] has index to 2nd level table.
2nd level table is consists of (start, end) entries of valid pfns.

careful_pfn_valid(pfn)
  -> pfn_validmap[(pfn >> PFN_VALID_MAPSHIFT)] = entry
     if (entry =  ALL_VALID) return 1
     if (entry =  ALL_INVALID)  return 0

      -> check 2nd level,
     info = pfn_valid_info_table + entry.
     while(info->start_pfn < pfn) {
          if((info->start_pfn <= pfn) && (info->end_pfn > pfn))
                     return 0;
               info++;
     }
     return 1;
==
sizeof(entry) is 2 bytes and each entry covers 1GB with current config(16k pages).

Here is kernbench results on my Tiger4 (Itanium2(1.3GHz) x2, 8 Gbytes memory),pagesize\x16k

Average Optimal -j8 Load Run:
                         Elapsed Time  User Time  System Time  Percent CPU  C/Switch   Sleeps
2.6.9-rc3                 699.906       1322.01     39.336        194        64390    74416.8
2.6.9-rc3 + this_patch    698.478       1321.76     38.228        194        64502    74185

there are no difference :)

For NUMA, I think tables for careful_pfn_valid() should be copied to each node's local memory,
but I haven't implemented it yet.

-- Kame <kamezawa.hiroyu@jp.fujitsu.com>


             reply	other threads:[~2004-10-06  6:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06  6:20 Hiroyuki KAMEZAWA [this message]
2004-10-06  6:33 ` [RFC/PATCH] pfn_valid() more generic : intro[0/2] Luck, Tony
2004-10-06  7:33   ` Hiroyuki KAMEZAWA
2004-10-06  6:37 ` [RFC/PATCH] pfn_valid() more generic : arch independent part[0/2] Hiroyuki KAMEZAWA
2004-10-06 15:14   ` Martin J. Bligh
2004-10-07  0:10     ` Hiroyuki KAMEZAWA
2004-10-07  5:22 ` Luck, Tony
2004-10-07  6:28   ` Hiroyuki KAMEZAWA
2004-10-07 14:38     ` Martin J. Bligh
2004-10-07 23:38       ` Hiroyuki KAMEZAWA
2004-10-07 15:53 ` Luck, Tony
2004-10-07 16:02   ` Martin J. Bligh

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=41638EC8.9090901@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.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