All of lore.kernel.org
 help / color / mirror / Atom feed
From: David VomLehn <dvomlehn@cisco.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	C Michael Sundius <Michael.sundius@sciatl.com>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mm@kvack.org, linux-mips@linux-mips.org,
	jfraser@broadcom.com, Andy Whitcroft <apw@shadowen.org>
Subject: Re: sparsemem support for mips with highmem
Date: Tue, 19 Aug 2008 16:38:01 -0700	[thread overview]
Message-ID: <48AB5959.6090609@cisco.com> (raw)
In-Reply-To: <48AAC54D.8020609@linux-foundation.org>

Christoph Lameter wrote:
> David VomLehn wrote:
> 
>> On MIPS processors, the kernel runs in unmapped memory, i.e. the TLB
>> isn't even
>> used, so I don't think you can use that trick. So, this comment doesn't
>> apply to
>> all processors.
> 
> In that case you have a choice between the overhead of sparsemem lookups in
> every pfn_to_page or using TLB entries to create a virtually mapped memmap
> which may create TLB pressure.
> 
> The virtually mapped memmap results in smaller code and is typically more
> effective since the processor caches the TLB entries.

I'm pretty ignorant on this subject, but I think this is worth discussing. On a 
MIPS processor, access to low memory bypasses the TLB entirely. I think what you 
are suggesting is to use mapped addresses to make all of low memory virtually 
contiguous. On a MIPS processor, we could do this by allocating a "wired" TLB 
entry for each physically contiguous block of memory. Wired TLB entries are never 
replaced, so they are very efficient for long-lived mappings such as this. Using 
the TLB in this way does increase TLB pressure, but most platforms probably have 
a very small number of "holes" in their memory. So, this may be a small overhead.

If we took this approach, we could then have a single, simple memmap array where 
pfn_to_page looks just about the same as it looks with a flat memory model.

If I'm understand what you are suggesting correctly (a big if), the downside is 
that we'd pay the cost of a TLB match for each non-cached low memory data access. 
It seems to me that would be a higher cost than having the occasional, more 
expensive, sparsemem lookup in pfn_to_page.

Anyone with more in-depth MIPS processor architecture knowledge care to weigh in 
on this?
--
David VomLehn

WARNING: multiple messages have this Message-ID (diff)
From: David VomLehn <dvomlehn@cisco.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	C Michael Sundius <Michael.sundius@sciatl.com>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mm@kvack.org, linux-mips@linux-mips.org,
	jfraser@broadcom.com, Andy Whitcroft <apw@shadowen.org>
Subject: Re: sparsemem support for mips with highmem
Date: Tue, 19 Aug 2008 16:38:01 -0700	[thread overview]
Message-ID: <48AB5959.6090609@cisco.com> (raw)
In-Reply-To: <48AAC54D.8020609@linux-foundation.org>

Christoph Lameter wrote:
> David VomLehn wrote:
> 
>> On MIPS processors, the kernel runs in unmapped memory, i.e. the TLB
>> isn't even
>> used, so I don't think you can use that trick. So, this comment doesn't
>> apply to
>> all processors.
> 
> In that case you have a choice between the overhead of sparsemem lookups in
> every pfn_to_page or using TLB entries to create a virtually mapped memmap
> which may create TLB pressure.
> 
> The virtually mapped memmap results in smaller code and is typically more
> effective since the processor caches the TLB entries.

I'm pretty ignorant on this subject, but I think this is worth discussing. On a 
MIPS processor, access to low memory bypasses the TLB entirely. I think what you 
are suggesting is to use mapped addresses to make all of low memory virtually 
contiguous. On a MIPS processor, we could do this by allocating a "wired" TLB 
entry for each physically contiguous block of memory. Wired TLB entries are never 
replaced, so they are very efficient for long-lived mappings such as this. Using 
the TLB in this way does increase TLB pressure, but most platforms probably have 
a very small number of "holes" in their memory. So, this may be a small overhead.

If we took this approach, we could then have a single, simple memmap array where 
pfn_to_page looks just about the same as it looks with a flat memory model.

If I'm understand what you are suggesting correctly (a big if), the downside is 
that we'd pay the cost of a TLB match for each non-cached low memory data access. 
It seems to me that would be a higher cost than having the occasional, more 
expensive, sparsemem lookup in pfn_to_page.

Anyone with more in-depth MIPS processor architecture knowledge care to weigh in 
on this?
--
David VomLehn


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-08-19 23:40 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 22:05 sparsemem support for mips with highmem C Michael Sundius
2008-08-14 22:35 ` Dave Hansen
2008-08-14 22:35   ` Dave Hansen
2008-08-14 23:16   ` C Michael Sundius
2008-08-14 23:16     ` C Michael Sundius
2008-08-14 23:52   ` C Michael Sundius
2008-08-15  0:02     ` Dave Hansen
2008-08-15  0:02       ` Dave Hansen
2008-08-15  8:03     ` Thomas Bogendoerfer
2008-08-15  8:03       ` Thomas Bogendoerfer
2008-08-15 15:48       ` Dave Hansen
2008-08-15 15:48         ` Dave Hansen
2008-08-15 16:12         ` C Michael Sundius
2008-08-15 16:12           ` C Michael Sundius
2008-08-15 16:20           ` Dave Hansen
2008-08-15 16:20             ` Dave Hansen
2008-08-15 16:33           ` Thomas Bogendoerfer
2008-08-15 16:33             ` Thomas Bogendoerfer
2008-08-15 17:16             ` C Michael Sundius
2008-08-15 17:16               ` C Michael Sundius
2008-08-15 17:37               ` Dave Hansen
2008-08-15 17:37                 ` Dave Hansen
2008-08-15 18:17                 ` C Michael Sundius
2008-08-15 18:17                   ` C Michael Sundius
2008-08-15 18:23                   ` Dave Hansen
2008-08-15 18:23                     ` Dave Hansen
2008-08-16 20:07                     ` Thomas Bogendoerfer
2008-08-16 20:07                       ` Thomas Bogendoerfer
2008-08-18 16:44                   ` Randy Dunlap
2008-08-18 16:44                     ` Randy Dunlap
2008-08-18 21:24                     ` Christoph Lameter
2008-08-18 21:24                       ` Christoph Lameter
2008-08-18 21:27                       ` Dave Hansen
2008-08-18 21:27                         ` Dave Hansen
2008-08-18 21:33                         ` Christoph Lameter
2008-08-18 21:33                           ` Christoph Lameter
2009-01-16 21:46                           ` Michael Sundius
2009-01-16 21:46                             ` Michael Sundius
2009-01-21 14:39                             ` Christoph Lameter
2009-01-21 14:39                               ` Christoph Lameter
2008-08-18 21:57                       ` David VomLehn
2008-08-18 21:57                         ` David VomLehn
2008-08-19 13:06                         ` Christoph Lameter
2008-08-19 13:06                           ` Christoph Lameter
2008-08-19 23:38                           ` David VomLehn [this message]
2008-08-19 23:38                             ` David VomLehn
2008-08-19 23:53                             ` Jon Fraser
2008-08-19 23:53                               ` Jon Fraser
2008-08-20 13:58                             ` Christoph Lameter
2008-08-20 13:58                               ` Christoph Lameter
2008-08-20 19:28                               ` David VomLehn
2008-08-20 19:28                                 ` David VomLehn
2008-08-20 20:51                                 ` Christoph Lameter
2008-08-20 20:51                                   ` Christoph Lameter
2008-08-15 16:30         ` Thomas Bogendoerfer
2008-08-15 16:30           ` Thomas Bogendoerfer
2008-08-26  9:09     ` Andy Whitcroft
2008-08-26  9:09       ` Andy Whitcroft
2008-10-06 20:15       ` Have ever checked in your mips sparsemem code into mips-linux tree? C Michael Sundius

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=48AB5959.6090609@cisco.com \
    --to=dvomlehn@cisco.com \
    --cc=Michael.sundius@sciatl.com \
    --cc=apw@shadowen.org \
    --cc=cl@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=jfraser@broadcom.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@xenotime.net \
    --cc=tsbogend@alpha.franken.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.