Re: SMP support for swsusp (this one actually works for me)

From: Pavel Machek
Date: Thu Jun 24 2004 - 16:43:58 EST


Hi!

> > Here's SMP support for swsusp; this one actually works for me [with
> > keyboard hack], but I'd like more testers. If it looks okay, I'll
> > merge simple pieces with andrew.
>
> This looks cool, but I have some aesthetic nits about it:

I'll kill #if 0s before attempting to merge.

> > +#ifdef CONFIG_SMP
> > +extern void smp_freeze(void);
> > +extern void smp_restart(void);
> > +#else
> > +static inline void smp_freeze(void) {}
> > +static inline void smp_restart(void) {}
> > +#endif
>
> Could you name those something more explicit, like swsusp_smp_freeze(),
> etc, so you don't have potential namespace conflicts?

I guess that S3 sleep might find them usefull, too.

Perhaps calling them disable_nonboot_cpus() and enable_nonboot_cpus()
are better names?

> > -void save_processor_state(void)
> > +void __save_processor_state(struct saved_context *ctxt)
>
> > +void save_processor_state(void)
> > +{
> > + __save_processor_state(&saved_context);
> > }
>
> This also looks completely gratuitous and confusing - if you're not doing
> anything else but calling the __function, then why even create
> __function?

__save_processor_state() is needed from smp.c, save_processor_state()
is needed from swsusp.S. I did not want to break that for now.

> > EXPORT_SYMBOL(save_processor_state);
> > EXPORT_SYMBOL(restore_processor_state);
>
> And, why are they exported in the first place?

Not sure... swsusp can't be modular so I should be able to just kill
this, right?

> > %diffstat
> > Documentation/power/swsusp.txt | 5 +
> > Documentation/power/video.txt | 4 +
...
> > kernel/power/smp.c | 85 ++++++++++++++++++++++++++++++
> > kernel/power/swsusp.c | 78 +++++++++++++++++++--------
> > kernel/signal.c | 6 +-
> > 17 files changed, 293 insertions(+), 102 deletions(-)
>
> Were there more files to the patch? Some of the ones listed here were not
> in the email?

I hand-edited the diff and forgot to kill this, sorry. Nothing should
be missing.

> BTW, nice work.

Thanks!
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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/