linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC] transcendent memory for Linux
       [not found] <cd40cd91-66e9-469d-b079-3a899a3ccadb@default>
@ 2009-06-27 13:18 ` Linus Walleij
  2009-06-28  7:42   ` Avi Kivity
  2009-06-29 14:44   ` Dan Magenheimer
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2009-06-27 13:18 UTC (permalink / raw)
  To: Dan Magenheimer
  Cc: linux-kernel, xen-devel, npiggin, chris.mason, kurt.hackel,
	dave.mccracken, Avi Kivity, jeremy, Rik van Riel, alan,
	Rusty Russell, Martin Schwidefsky, akpm, Marcelo Tosatti,
	Balbir Singh, tmem-devel, sunil.mushran, linux-mm, Himanshu Raj,
	linux-embedded

2009/6/20 Dan Magenheimer <dan.magenheimer@oracle.com>:

> We call this latter class "transcendent memory" and it
> provides an interesting opportunity to more efficiently
> utilize RAM in a virtualized environment.  However this
> "memory but not really memory" may also have applications
> in NON-virtualized environments, such as hotplug-memory
> deletion, SSDs, and page cache compression.  Others have
> suggested ideas such as allowing use of highmem memory
> without a highmem kernel, or use of spare video memory.

Here is what I consider may be a use case from the embedded
world: we have to save power as much as possible, so we need
to shut off entire banks of memory.

Currently people do things like put memory into self-refresh
and then sleep, but for long lapses of time you would
want to compress memory towards lower addresses and
turn as many banks as possible off.

So we have something like 4x16MB banks of RAM = 64MB RAM,
and the most necessary stuff easily fits in one of them.
If we can shut down 3x16MB we save 3 x power supply of the
RAMs.

However in embedded we don't have any swap, so we'd need
some call that would attempt to remove a memory by paging
out code and data that has been demand-paged in
from the FS but no dirty pages, these should instead be
moved down to memory which will be retained, and the
call should fail if we didn't succeed to migrate all
dirty pages.

Would this be possible with transcendent memory?

Yours,
Linus Walleij

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] transcendent memory for Linux
  2009-06-27 13:18 ` [RFC] transcendent memory for Linux Linus Walleij
@ 2009-06-28  7:42   ` Avi Kivity
  2009-06-29 14:44   ` Dan Magenheimer
  1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-06-28  7:42 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Dan Magenheimer, linux-kernel, xen-devel, npiggin, chris.mason,
	kurt.hackel, dave.mccracken, jeremy, Rik van Riel, alan,
	Rusty Russell, Martin Schwidefsky, akpm, Marcelo Tosatti,
	Balbir Singh, tmem-devel, sunil.mushran, linux-mm, Himanshu Raj,
	linux-embedded

On 06/27/2009 04:18 PM, Linus Walleij wrote:
> 2009/6/20 Dan Magenheimer<dan.magenheimer@oracle.com>:
>
>    
>> We call this latter class "transcendent memory" and it
>> provides an interesting opportunity to more efficiently
>> utilize RAM in a virtualized environment.  However this
>> "memory but not really memory" may also have applications
>> in NON-virtualized environments, such as hotplug-memory
>> deletion, SSDs, and page cache compression.  Others have
>> suggested ideas such as allowing use of highmem memory
>> without a highmem kernel, or use of spare video memory.
>>      
>
> Here is what I consider may be a use case from the embedded
> world: we have to save power as much as possible, so we need
> to shut off entire banks of memory.
>
> Currently people do things like put memory into self-refresh
> and then sleep, but for long lapses of time you would
> want to compress memory towards lower addresses and
> turn as many banks as possible off.
>
> So we have something like 4x16MB banks of RAM = 64MB RAM,
> and the most necessary stuff easily fits in one of them.
> If we can shut down 3x16MB we save 3 x power supply of the
> RAMs.
>
> However in embedded we don't have any swap, so we'd need
> some call that would attempt to remove a memory by paging
> out code and data that has been demand-paged in
> from the FS but no dirty pages, these should instead be
> moved down to memory which will be retained, and the
> call should fail if we didn't succeed to migrate all
> dirty pages.
>
> Would this be possible with transcendent memory?
>    

You could do this with memory defragmentation, which is needed for 
things like memory hotunplug ayway.

-- 
error compiling committee.c: too many arguments to function

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC] transcendent memory for Linux
  2009-06-27 13:18 ` [RFC] transcendent memory for Linux Linus Walleij
  2009-06-28  7:42   ` Avi Kivity
@ 2009-06-29 14:44   ` Dan Magenheimer
  2009-07-01  3:41     ` Roland Dreier
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Magenheimer @ 2009-06-29 14:44 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, xen-devel, npiggin, chris.mason, kurt.hackel,
	dave.mccracken, Avi Kivity, jeremy, Rik van Riel, alan,
	Rusty Russell, Martin Schwidefsky, akpm, Marcelo Tosatti,
	Balbir Singh, tmem-devel, sunil.mushran, linux-mm, Himanshu Raj,
	linux-embedded



> From: Linus Walleij [mailto:linus.ml.walleij@gmail.com]
> Sent: Saturday, June 27, 2009 7:19 AM
> Subject: Re: [RFC] transcendent memory for Linux
> 
> > We call this latter class "transcendent memory" and it
> > provides an interesting opportunity to more efficiently
> > utilize RAM in a virtualized environment.  However this
> > "memory but not really memory" may also have applications
> > in NON-virtualized environments, such as hotplug-memory
> > deletion, SSDs, and page cache compression.  Others have
> > suggested ideas such as allowing use of highmem memory
> > without a highmem kernel, or use of spare video memory.
> 
> Here is what I consider may be a use case from the embedded
> world: we have to save power as much as possible, so we need
> to shut off entire banks of memory.
> 
> Currently people do things like put memory into self-refresh
> and then sleep, but for long lapses of time you would
> want to compress memory towards lower addresses and
> turn as many banks as possible off.
> 
> So we have something like 4x16MB banks of RAM = 64MB RAM,
> and the most necessary stuff easily fits in one of them.
> If we can shut down 3x16MB we save 3 x power supply of the
> RAMs.
> 
> However in embedded we don't have any swap, so we'd need
> some call that would attempt to remove a memory by paging
> out code and data that has been demand-paged in
> from the FS but no dirty pages, these should instead be
> moved down to memory which will be retained, and the
> call should fail if we didn't succeed to migrate all
> dirty pages.
> 
> Would this be possible with transcendent memory?

Yes, I think this would work nicely as a use case for tmem.

As Avi points out, you could do this with memory defragmentation,
but if you know in advance that you will be frequently
powering on and off a bank of RAM, you could put only
ephemeral memory into it (enforced by a kernel policy and
the tmem API), then defragmentation (and compression towards
lower addresses) would not be necessary, and you could power
off a bank with no loss of data.

One issue though: I would guess that copying pages of memory
could be very slow in an inexpensive embedded processor.

Dan

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] transcendent memory for Linux
  2009-06-29 14:44   ` Dan Magenheimer
@ 2009-07-01  3:41     ` Roland Dreier
  0 siblings, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2009-07-01  3:41 UTC (permalink / raw)
  To: Dan Magenheimer
  Cc: Linus Walleij, linux-kernel, xen-devel, npiggin, chris.mason,
	kurt.hackel, dave.mccracken, Avi Kivity, jeremy, Rik van Riel,
	alan, Rusty Russell, Martin Schwidefsky, akpm, Marcelo Tosatti,
	Balbir Singh, tmem-devel, sunil.mushran, linux-mm, Himanshu Raj,
	linux-embedded


 > One issue though: I would guess that copying pages of memory
 > could be very slow in an inexpensive embedded processor.

And copying memory could very easily burn enough power by keeping the
CPU busy that you lose the incremental gain of turning the memory off
vs. just going to self refresh.  (And the copying latency would easily
be as bad as the transition latency to/from self-refresh).

 - R.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-01  3:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cd40cd91-66e9-469d-b079-3a899a3ccadb@default>
2009-06-27 13:18 ` [RFC] transcendent memory for Linux Linus Walleij
2009-06-28  7:42   ` Avi Kivity
2009-06-29 14:44   ` Dan Magenheimer
2009-07-01  3:41     ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).