mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* in_suspend and __nosave
@ 2009-04-30 20:30 Sam Ravnborg
  2009-04-30 22:09 ` Rafael J. Wysocki
  2009-05-03 21:57 ` Pavel Machek
  0 siblings, 2 replies; 3+ messages in thread
From: Sam Ravnborg @ 2009-04-30 20:30 UTC (permalink / raw)
  To: Rafael J. Wysocki, Linus Torvalds; +Cc: LKML, Tim Abbott

Hi Rafael & Linus.

While unifying vmlinux.lds for x86 I stumbled
over the .data.nosave section.

Searching a bit I found only a single user:

swsusp.c:int in_suspend __nosavedata = 0;

Do we really needs all this complexity for this single integer?
We have this section defined in several arch lds files.

I understand that in_suspend is special as in that we do not
want the value restored while resuming.
But is there no other way to do so today?

All I want is to kill a lot from the vmlinux.lds files.

It also occur to me that only: x86, powerpc, and sh
implement pfn_is_nosave() which I think is the only
place where we decide if we want to save a page or not.

But we define the .data.nosave section in following
architectures:
arm, m32r, mips, mn10300, parisc, s390 in addition
to the above archs that define pfn_is_nosave().
Is this something to be cleaned up?

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: in_suspend and __nosave
  2009-04-30 20:30 in_suspend and __nosave Sam Ravnborg
@ 2009-04-30 22:09 ` Rafael J. Wysocki
  2009-05-03 21:57 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2009-04-30 22:09 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linus Torvalds, LKML, Tim Abbott

On Thursday 30 April 2009, Sam Ravnborg wrote:
> Hi Rafael & Linus.

Hi,

> While unifying vmlinux.lds for x86 I stumbled
> over the .data.nosave section.
> 
> Searching a bit I found only a single user:
> 
> swsusp.c:int in_suspend __nosavedata = 0;
> 
> Do we really needs all this complexity for this single integer?
> We have this section defined in several arch lds files.
> 
> I understand that in_suspend is special as in that we do not
> want the value restored while resuming.
> But is there no other way to do so today?

On x86-64 we can probably get rid of it, a little code rework is needed for
this purpose.  Unfortunately some more work is required to do the same
thing on x86-32.

> All I want is to kill a lot from the vmlinux.lds files.

Well, removing the __nosavedata is on my todo list, but not on the top of it.

> It also occur to me that only: x86, powerpc, and sh
> implement pfn_is_nosave() which I think is the only
> place where we decide if we want to save a page or not.
> 
> But we define the .data.nosave section in following
> architectures:
> arm, m32r, mips, mn10300, parisc, s390 in addition
> to the above archs that define pfn_is_nosave().
> Is this something to be cleaned up?

Yes, it is.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: in_suspend and __nosave
  2009-04-30 20:30 in_suspend and __nosave Sam Ravnborg
  2009-04-30 22:09 ` Rafael J. Wysocki
@ 2009-05-03 21:57 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2009-05-03 21:57 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Rafael J. Wysocki, Linus Torvalds, LKML, Tim Abbott

Hi!

> While unifying vmlinux.lds for x86 I stumbled
> over the .data.nosave section.
> 
> Searching a bit I found only a single user:
> 
> swsusp.c:int in_suspend __nosavedata = 0;
> 
> Do we really needs all this complexity for this single integer?
> We have this section defined in several arch lds files.

Well, original idea was that drivers may need some memory that's not
affected by hibernation/restore....

> It also occur to me that only: x86, powerpc, and sh
> implement pfn_is_nosave() which I think is the only
> place where we decide if we want to save a page or not.
> 
> But we define the .data.nosave section in following
> architectures:
> arm, m32r, mips, mn10300, parisc, s390 in addition
> to the above archs that define pfn_is_nosave().
> Is this something to be cleaned up?

I guess people were just too happy with cut&paste. Ouch and someone
was working on arm hibernation, iIRC. 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-03 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 20:30 in_suspend and __nosave Sam Ravnborg
2009-04-30 22:09 ` Rafael J. Wysocki
2009-05-03 21:57 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®