lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make refrigerator cold
On Wed, 23 Sep 2009 01:13:20 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Tuesday 22 September 2009, Stephen Hemminger wrote:
> > On Tue, 22 Sep 2009 21:54:09 +0200
> > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
> > > On Tuesday 22 September 2009, Stephen Hemminger wrote:
> > > > By marking it cold, then the code path in kernel thread
> > > > usage of try_to_freeze() that is normally used be
> > > > selected.
> > >
> >
> > In the code for try_to_freeze(), for optimization, it might
> > help to tell the compiler to not favor the code path where
> > the refigrator is being called.
> >
> > Another way to do the same thing would be to do.
> > if (unlikely(freezing(current))) {
> > refrigerator();
> > return 1;
> > } else
> > return 0;
> >
> > or build unlikely into the freezing function (see need_resched).
> >
> > I saw this by trying to minimize the number of intstructions
> > in pktgen which is a special case.
>
> OK, thanks.
>
> Will it be fine with you if I add the patch to the suspend-2.6 tree with the
> above information in the changelog?
>
> Rafael

Sure, any of the possibilities works, you choose.


\
 
 \ /
  Last update: 2009-09-23 01:23    [W:0.021 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site