lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201105182009.55813.Martin@lichtvoll.de>
Date:	Wed, 18 May 2011 20:09:46 +0200
From:	Martin Steigerwald <Martin@...htvoll.de>
To:	Pavel Machek <pavel@....cz>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux PM mailing list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] PM / Hibernate: Add sysfs knob to control size of memory for drivers

Am Mittwoch, 18. Mai 2011 schrieb Pavel Machek:
> Hi!
> 
> > > From: Rafael J. Wysocki <rjw@...k.pl>
> > > 
> > > Martin reports that on his system hibernation occasionally fails
> > > due to the lack of memory, because the radeon driver apparently
> > > allocates too much of it during the device freeze stage.  It turns
> > > out that the amount of memory allocated by radeon during
> > > hibernation (and presumably during system suspend too) depends on
> > > the utilization of the GPU (e.g. hibernating while there are two
> > > KDE 4 sessions with compositing enabled causes radeon to allocate
> > > more memory than for one KDE 4 session).
> > > 
> > > In principle it should be possible to use image_size to make the
> > > memory preallocation mechanism free enough memory for the radeon
> > > driver, but in practice it is not easy to guess the right value
> > > because of the way the preallocation code uses image_size.  For
> > > this reason, it seems reasonable to allow users to control the
> > > amount of memory reserved for driver allocations made after the
> > > preallocation, which currently is constant and amounts to 1 MB.
> > > 
> > > Introduce a new sysfs file, /sys/power/reserved_size, whose value
> > > will be used as the amount of memory to reserve for the
> > > post-preallocation reservations made by device drivers, in bytes.
> > > For backwards compatibility, set its default (and initial) value to
> > > the currently used number (1 MB).
> > > 
> > > References: https://bugzilla.kernel.org/show_bug.cgi?id=34102
> > > Reported-by: Martin Steigerwald <Martin@...htvoll.de>
> > > Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> > 
> > OK, there are no comments, so my understanding is that everyone is
> > fine with this patch and I can add it to my linux-next branch.
> 
> Actually no, I don't like it. Yes, knob might be useful for debugging,
> but having it as part of official kernel interface...

Well I and people with similar setups it is actually quite useful. It 
makes the difference between does hibernate *every time* versus does not 
hibernate sometimes. And I don't see why it can't go again, when the issue 
is taken care of elsewise in the future. I think that autotuning / drivers 
allocating their memory via whatnot is better, but until such a mechanism 
is agreed, developed and included in official kernel I do think that this 
knob does help.

So or so I will patch this in for the kernels for my ThinkPad T42, whether 
its part of the official kernel or not. And I build my own kernels anyway. 
So when described issue really only happens on my setup and nowhere 
else...

I think missing is some documentation so that the advanced user can figure 
out this knob.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ