mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@osdl.org>, Jeff Dike <jdike@addtoit.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [uml-devel] Re: [PATCH 12/16] UML - Memory hotplug
Date: Sat, 25 Mar 2006 00:58:57 +0100	[thread overview]
Message-ID: <200603250058.57700.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060324144535.37b3daf7.akpm@osdl.org>

On Friday 24 March 2006 23:45, Andrew Morton wrote:
> Jeff Dike <jdike@addtoit.com> wrote:

> > Unplugged pages are allocated and then madvise(MADV_REMOVE), 

> > This patch also removes checking for /dev/anon on the host, which is
> > obsoleted by MADVISE_REMOVE.

>  * NOTE: Currently, only shmfs/tmpfs is supported for this operation.
>  * Other filesystems return -ENOSYS.

> Are you expecting that this memory is backed by tmpfs?

Yes, that's the recommended configuration, and we're going to move the default 
position for the backing file to /dev/shm.

However, it's bogus to miss any error handling - possibly not returning err is 
wanted (dunno) because Jeff wants to pretend it succeeded anyway, but at 
least a printk() to inform the user that memory must lay on tmpfs is 
required.

> +int os_drop_memory(void *addr, int length)
> +{
> +     int err;
> +
> +     err = madvise(addr, length, MADV_REMOVE);
> +     if(err < 0)
> +             err = -errno;

Jeff, did you mean the "return _0_" rather than "return err" below? It's 
incoherent with the existance of the "err" local.

> +     return 0;
> +}

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

  reply	other threads:[~2006-03-24 23:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 18:14 Jeff Dike
2006-03-24 22:45 ` Andrew Morton
2006-03-24 23:58   ` Blaisorblade [this message]
2006-03-25  1:19     ` [uml-devel] " Jeff Dike
2006-03-25  1:05   ` Jeff Dike
2006-04-05 22:02     ` Daniel Phillips
2006-04-06  1:56       ` [uml-devel] " Jeff Dike
2006-04-06  3:32         ` Andrew Morton
2006-04-06  3:33           ` Andrew Morton
2006-04-06  3:42         ` Daniel Phillips
2006-03-25 19:26   ` Jan Engelhardt
2006-03-25 20:08     ` Jeff Dike

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=200603250058.57700.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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