Re: [TuxOnIce-devel] [RFC] TuxOnIce

From: Oliver Neukum
Date: Mon May 25 2009 - 19:13:29 EST


Am Dienstag, 26. Mai 2009 00:58:53 schrieb Rafael J. Wysocki:
> On Tuesday 26 May 2009, Oliver Neukum wrote:

> > No, I am afraid it is not. The average user has no clue. Even if that
> > is not the problem, the user never knows for sure he has encountered
> > the worst case.
>
> OK there, but surely it's better to have a sysfs attribute than a fixed
> value?

Why? The driver knows best. Tunables are generally the worst solution.

> > If you really have drivers that have exceptionally large memory
> > requirements (eg. you need to copy video ram), you should tell the system
> > through struct driver and do accounting at probe and removal of devices.
>
> Or perhaps the drivers should allocate memory from a PM notifier (which is
> called before the freezing of tasks) to avoid the problem?

That's also possible. It is slightly more wasteful, as you are required
to actually the memory. If you tell the core, it is sufficient that the memory
can be freed without a device driver becoming involved, that is the page
must be cleaned but doesn't have to be dropped.

Regards
Oliver

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