From: Dave Hansen <haveblue@us.ibm.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
melgor@ie.ibm.com, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] Add "removable" to /sysfs to show memblock removability
Date: Thu, 25 Oct 2007 15:45:54 -0700 [thread overview]
Message-ID: <1193352354.24087.85.camel@localhost> (raw)
In-Reply-To: <1193351756.9894.30.camel@dyn9047017100.beaverton.ibm.com>
On Thu, 2007-10-25 at 15:35 -0700, Badari Pulavarty wrote:
>
> +static ssize_t show_mem_removable(struct sys_device *dev, char *buf)
> +{
> + unsigned long start_pfn;
> + struct memory_block *mem =
> + container_of(dev, struct memory_block, sysdev);
> +
> + start_pfn = section_nr_to_pfn(mem->phys_index);
> + if (is_mem_section_removable(start_pfn, PAGES_PER_SECTION))
> + return sprintf(buf, "True\n");
> + else
> + return sprintf(buf, "False\n");
> +
Yeah, that's what I had in mind. The only other thing I might suggest
would be to do a number instead of true/false here. Just so that we
_can_ have scores in the future. Otherwise fine with me.
-- Dave
--
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>
next prev parent reply other threads:[~2007-10-25 22:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 22:35 [PATCH] Add "removable" to /sysfs to show memblock removability Badari Pulavarty
2007-10-25 22:45 ` Dave Hansen [this message]
2007-10-25 23:32 ` Badari Pulavarty
2007-10-26 0:27 ` KAMEZAWA Hiroyuki
2007-10-26 14:47 ` Mel Gorman
-- strict thread matches above, loose matches on Subject: below --
2007-10-26 16:56 Badari Pulavarty
2007-10-26 23:57 ` KAMEZAWA Hiroyuki
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=1193352354.24087.85.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=melgor@ie.ibm.com \
--cc=pbadari@us.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).