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: <20090922140914.041b7328@s6510>
Date:	Tue, 22 Sep 2009 14:09:14 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Len Brown <len.brown@...el.com>,
	Matt Helsley <matthltc@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] make refrigerator cold

On Tue, 22 Sep 2009 21:54:09 +0200
"Rafael J. Wysocki" <rjw@...k.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.



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ