[ACPI] [RFC] dev_acpi: support for userspace access to acpi

linux

RE: [ACPI] [RFC] dev_acpi: support for userspace access to acpi

Postby Yu, Luming » Thu, 28 Oct 2004 11:50:04 GMT

f you want to have a full access to acpi subsystem from userspace, why not firstly move ACPI interpreter out of kernel?
Then, you can play with the whole ACPI subsystem with minimal cost of troubling kernel in userspace. Say, you can forget "
ioctl, read issues on files, complex data for sysfs, file per operation, etc...". Is it a more clean way ?

Thanks
Luming

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

RE: [ACPI] [RFC] dev_acpi: support for userspace access to acpi

Postby Alex Williamson » Thu, 28 Oct 2004 12:40:06 GMT

The kernel certainly needs an ACPI interpreter and it needs it before
userspace is launched. Handing off the interpreter to userspace or
managing two interpreters poking ACPI at the same time seems like a much
more complicated problem. The kernel is the primary consumer, I think
it would just shift the problem elsewhere to consider moving it.

The problems quoted below were from the previous sysfs interface I was
developing. I think these problems are fixed with this current device
file interface. I'm hoping dev_acpi is already more clean. Thanks,

Alex

On Wed, 2004-10-27 at 10:30 +0800, Yu, Luming wrote:
--
Alex Williamson HP Linux & Open Source Lab

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

RE: [ACPI] [RFC] dev_acpi: support for userspace access to acpi

Postby Yu, Luming » Fri, 29 Oct 2004 02:40:19 GMT

If don't use acpi_early_init , acpi is initialized in do_basic_setup() in kernel thread --init.
It is very close to launch first user space process(/sbin/init ..). So, if we can invent
acpi_later_init, it is possible to move interpreter out of kernel.

The difficulty for inventing userspace interpreter is to eliminate the ACPI-interpreter dependency
of drivers for booting. But this dependency is not mandatory. Once kernel booted to be able
to launch /sbin/init, it is also able to launch /sbin/user_space_interpreter, then kernel can enjoy
acpi from then on, despite the acpi interpreter is a user space daemon, we just need to invent
or user a communication method between kernel and user space daemon.

But, Not sure what's the evil consequence from this approach. Say, if kernel need service
from ACPI interpreter, ACPI interpreter should be get scheduled. Is it racy?

Thanks
Luming

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Re: [ACPI] [RFC] dev_acpi: support for userspace access to acpi

Postby Bjorn Helgaas » Fri, 29 Oct 2004 09:20:11 GMT



It's true that some early init stuff is based on the static tables
and doesn't require the interpreter.  But there is a lot of stuff
that DOES require the interpreter, like finding PCI root bridges,
PRTs, PCI interrupt link devices, etc.  It's not clear to me that
it's feasible to deal with all these from userspace.


Before the interpreter, you don't have ANY devices (legacy ones are
described via the namespace of course, and PCI devices depend on root
bridges that are also in the namespace).  So you end up at least
requiring a ramdisk, plus a bunch of encoding to communicate resource
information from the interpreter to the drivers.

Maybe not impossible, but it certainly requires a lot of work.  Moving
the interpreter to userspace has been proposed many times, but I've
never seen any indication that anybody is actually working on it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to  XXXX@XXXXX.COM 
More majordomo info at   http://www.**--****.com/ 
Please read the FAQ at   http://www.**--****.com/ 



Return to linux

 

Who is online

Users browsing this forum: No registered users and 81 guest