* RE: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
@ 2004-09-09 18:28 Tolentino, Matthew E
[not found] ` <D36CE1FCEFD3524B81CA12C6FE5BCAB007A6C485-oCDej+MBycNZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Tolentino, Matthew E @ 2004-09-09 18:28 UTC (permalink / raw)
To: Dave Hansen, S, Naveen B, keith
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, lhms
>What does this end up naming the module? If it ends up being memory.o,
>you might want to think about making it something a bit more
>descriptive. Does it even need to be allowed to be a module,
>or is that
>standard ACPI practice?
Currently, it names it memory.ko. Len has also suggested that it be
something more like memory_hotplug.ko or memory_hp.ko or something
like that, because the ACPI spec does include verbage about the
system memory map... As this driver does handle "memory"
devices, it kinda makes sense, but we're not wed to any particular
name... ;-)
I would prefer to maintain the option to build this driver as a module
at least until there is more testing. It's certainly easier to work
with right now as a module.
>I think I'd slightly prefer something that looks more like this (same
>thing goes for the add function):
>
>acpi_memory_disable_device(struct acpi_memory_device *mem_device)
>{
> int err;
> u64 start = mem_device->start_addr;
> u64 len = mem_device->end_addr - start + 1;
> unsigned long attr = mem_device->read_write_attribute;
>
> ACPI_FUNCTION_TRACE("acpi_memory_disable_device");
>
> /*
> * Ask the VM to offline this memory range.
> */
> err = remove_memory(start, len, attr);
>
> if (err) {
> ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove
>failed.\n"));
> return_VALUE(err);
> }
>...
Yeah, that's a little easier to read...
>Other than the add/remove_memory() calls does this have any real
>interaction with any non-ACPI code that I overlooked?
Nope, the only real interaction with the VM is isolated to those
calls. This driver is really only for handling the interaction
with real hardware via ACPI, so it shouldn't need to muck around
with other code...
Btw, Keith please give this a once over as I know we talked about
this before...
matt
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
[not found] ` <D36CE1FCEFD3524B81CA12C6FE5BCAB007A6C485-oCDej+MBycNZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-09 18:33 ` Dave Hansen
0 siblings, 0 replies; 6+ messages in thread
From: Dave Hansen @ 2004-09-09 18:33 UTC (permalink / raw)
To: Matthew E Tolentino
Cc: S, Naveen B, keith, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
lhms
On Thu, 2004-09-09 at 11:28, Tolentino, Matthew E wrote:
> >What does this end up naming the module? If it ends up being memory.o,
> >you might want to think about making it something a bit more
> >descriptive. Does it even need to be allowed to be a module,
> >or is that
> >standard ACPI practice?
>
> Currently, it names it memory.ko. Len has also suggested that it be
> something more like memory_hotplug.ko or memory_hp.ko or something
> like that, because the ACPI spec does include verbage about the
> system memory map... As this driver does handle "memory"
> devices, it kinda makes sense, but we're not wed to any particular
> name... ;-)
How about including acpi in the name? acpi_memory.o?
acpi_memhotplug.o?
> >Other than the add/remove_memory() calls does this have any real
> >interaction with any non-ACPI code that I overlooked?
>
> Nope, the only real interaction with the VM is isolated to those
> calls. This driver is really only for handling the interaction
> with real hardware via ACPI, so it shouldn't need to muck around
> with other code...
Cool. Looks pretty good.
-- Dave
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
@ 2004-09-10 12:49 S, Naveen B
0 siblings, 0 replies; 6+ messages in thread
From: S, Naveen B @ 2004-09-10 12:49 UTC (permalink / raw)
To: Tolentino, Matthew E, Dave Hansen, keith
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, lhms, S, Naveen B
>
> >I think I'd slightly prefer something that looks more like this (same
> >thing goes for the add function):
> >
> >acpi_memory_disable_device(struct acpi_memory_device *mem_device)
> >{
> > int err;
> > u64 start = mem_device->start_addr;
> > u64 len = mem_device->end_addr - start + 1;
> > unsigned long attr = mem_device->read_write_attribute;
> >
> > ACPI_FUNCTION_TRACE("acpi_memory_disable_device");
> >
> > /*
> > * Ask the VM to offline this memory range.
> > */
> > err = remove_memory(start, len, attr);
> >
> > if (err) {
> > ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove
> >failed.\n"));
> > return_VALUE(err);
> > }
> >...
>
> Yeah, that's a little easier to read...
>
This looks good and easier to read. Thanks for the suggestion, Dave.
--Naveen
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
@ 2004-09-10 13:01 S, Naveen B
[not found] ` <FEB6C4E97F6CAF41978FB2059D5454180F37F3-OkeUvhg1trkFyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: S, Naveen B @ 2004-09-10 13:01 UTC (permalink / raw)
To: Dave Hansen
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, lhms,
Tolentino, Matthew E, S, Naveen B
> > + if (remove_memory(mem_device->start_addr,
> > + (mem_device->end_addr - mem_device->start_addr) + 1,
> > + mem_device->read_write_attribute)) {
> > + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove
failed.\n"));
> > + return_VALUE(-EINVAL);
> > + }
> > +
>
> How about actually passing up the value that remove_memory() gave
back?
> Also, what's with the +1 on the size?
To find the actual length of memory being added/removed. This is to
include start and end byte in the given range.
>
> If it ends up that all of the callers of remove_memory() prefer to
give
> start and end addresses, we'll probably change the calling convention
at
> some point. Whatever is most natural.
Looks good. This should avoid usage of +1.
--Naveen
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
[not found] ` <FEB6C4E97F6CAF41978FB2059D5454180F37F3-OkeUvhg1trkFyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-10 15:33 ` Bjorn Helgaas
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2004-09-10 15:33 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: S, Naveen B, Dave Hansen, lhms, Tolentino, Matthew E
On Friday 10 September 2004 7:01 am, S, Naveen B wrote:
> > If it ends up that all of the callers of remove_memory() prefer to give
> > start and end addresses, we'll probably change the calling convention at
> > some point. Whatever is most natural.
>
> Looks good. This should avoid usage of +1.
IMHO an "address, size" convention is much nicer than "start, end".
I don't like "start, end" because (1) there's always the ambiguity of
whether the last byte is included, and (2) zero-length ranges look funny
(e.g., "0x0,0xffff").
"address, size" avoids both problems, and is already used by tons of
kernel interfaces like ioremap(), the dma interfaces, verify_area(),
memset(), etc, etc.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch
@ 2004-09-13 5:46 S, Naveen B
0 siblings, 0 replies; 6+ messages in thread
From: S, Naveen B @ 2004-09-13 5:46 UTC (permalink / raw)
To: Bjorn Helgaas, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: Dave Hansen, lhms, Tolentino, Matthew E
> IMHO an "address, size" convention is much nicer than "start, end".
>
> I don't like "start, end" because (1) there's always the ambiguity of
> whether the last byte is included, and (2) zero-length ranges look
funny
> (e.g., "0x0,0xffff").
>
> "address, size" avoids both problems, and is already used by tons of
> kernel interfaces like ioremap(), the dma interfaces, verify_area(),
> memset(), etc, etc.
I agree, Thanks Bjorn.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-13 5:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09 18:28 [Lhms-devel] [PATCH] ACPI based Memory Hotplug DriverPatch Tolentino, Matthew E
[not found] ` <D36CE1FCEFD3524B81CA12C6FE5BCAB007A6C485-oCDej+MBycNZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-09 18:33 ` Dave Hansen
-- strict thread matches above, loose matches on Subject: below --
2004-09-10 12:49 S, Naveen B
2004-09-10 13:01 S, Naveen B
[not found] ` <FEB6C4E97F6CAF41978FB2059D5454180F37F3-OkeUvhg1trkFyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-10 15:33 ` Bjorn Helgaas
2004-09-13 5:46 S, Naveen B
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox