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] [day] [month] [year] [list]
Message-ID: <20101129152730.GA2287@gentoo.trippelsdorf.de>
Date:	Mon, 29 Nov 2010 16:27:30 +0100
From:	Markus Trippelsdorf <markus@...ppelsdorf.de>
To:	Borislav Petkov <bp@...64.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Borislav Petkov <bp@...en8.de>,
	john stultz <johnstul@...ibm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"hpa@...ux.intel.com" <hpa@...ux.intel.com>,
	Ingo Molnar <mingo@...e.hu>,
	"Herrmann3, Andreas" <Andreas.Herrmann3@....com>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"avi@...hat.com" <avi@...hat.com>,
	"mtosatti@...hat.com" <mtosatti@...hat.com>
Subject: Re: [PATCH] HPET: Fix HPET readout for small deltas

On 2010.11.29 at 16:09 +0100, Borislav Petkov wrote:
> 
> Some HPET implementations might require longer delay when accessing the
> HPET than what 995bd3bb5c78f3ff71339803c0b8337ed36d64fb established (8
> cycles). Generally, the proper value should be programmed by BIOS and
> written into the ACPI HPET table as the main counter minimum tick in
> periodic mode (offset 53).
> 
> We assume that value as the minimum value a delta can be in order to
> reprogram the HPET successfully. For BIOSen which contain crap, we fall
> back to a default value of 128 cycles which should be sensible on all
> more or less sane HPET implementations.
> 
> LKML-Reference: <20101026112052.GA1672@...h.trippelsdorf.de>
> Signed-off-by: Borislav Petkov <borislav.petkov@....com>
> ---
> 
> As noted before, this patch fixes the sluggishness issue on Markus' and
> my machine. And we definitely need some kind of fix for .37.

Yes. Just a minor note, the comment in hpet.c should also be updated:

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index a0b790a..cfbbc94 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -403,9 +403,9 @@ static int hpet_next_event(unsigned long delta,
 	 * move us behind that point easily. Now instead of reading
 	 * the compare register back several times, we make the ETIME
 	 * decision based on the following: Return ETIME if the
-	 * counter value after the write is less than 8 HPET cycles
-	 * away from the event or if the counter is already ahead of
-	 * the event.
+	 * counter value after the write is less than hpet_min_tick
+	 * HPET cycles away from the event or if the counter is already
+	 * ahead of the event.
 	 */
 	res = (s32)(cnt - hpet_readl(HPET_COUNTER));
 

-- 
Markus
--
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