tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: audio power code tsleep()s from interrupt context



joerg%britannica.bec.de@localhost said:
> To be fair, I would classify that as bug in the USB code. 

However you turn it - you initiate a USB transaction and
you want to wait for its result. This can take a while,
so you have to wait. Whether USB uses an own thread internally
or not changes only who is going to wake you up. In any case
you have to wait, so you need a suitable context.

> Huh? The power saving is done by suspending the device if it is not used
> for a while. It is not mixed with suspend/resume in any other way.

Whai I say "mixed" I'm talking about semantics and terms, and
implementation. I'm not assuming that they happen at the same
time and that this might cause problems.

The suspend/resume functions as done now are primarily to get
the machine to sleep -S3 in ACPI for now-. The code implicitely
assumes that at a number of places. In particular it assumes
that PCI devices need to assume the D3 state and that a lot
of state needs to be saved. This is a relatively expensive
operation. (There is room for optimisation, see D3hot and D3cold
in terms of PCI power management, but is is good enough for now.)
As said, there are strict requirements and you don't get away
with much less.

To save just some power if a single device is not needed for some
time, there are more ways, which are less expensive, and where
the device gets operational again after less time. (Eg a USB
device doesn't lose state if suspended, so there is nothing
to save/restore.) There needs to be some policy, depending
on eg idle time and user preferences, which energy saving state
to assume.

What I want to say in that the API needs to be extended, so
that these cases are distinguished at a semantical level, and
finally so that a user can configure what response time he
is ready to trade in for energy saving.

best regards
Matthias




-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------



Home | Main Index | Thread Index | Old Index