lkml.org 
[lkml]   [2010]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, UV: Fix RTC latency bug by reading replicated cachelines

* Dimitri Sivanich <sivanich@sgi.com> wrote:

> +++ linux/drivers/char/uv_mmtimer.c 2010-01-14 11:56:57.000000000 -0600
> @@ -89,12 +89,19 @@ static long uv_mmtimer_ioctl(struct file
> switch (cmd) {
> case MMTIMER_GETOFFSET: /* offset of the counter */
> /*
> - * UV RTC register is on its own page
> + * Starting with HUB rev 2.0, the UV RTC register is
> + * replicated across all cachelines of it's own page.
> + * This allows faster simultaneous reads from a given socket.
> + *
> + * The offset returned is in 64 bit units.
> */
> - if (PAGE_SIZE <= (1 << 16))
> - ret = ((UV_LOCAL_MMR_BASE | UVH_RTC) & (PAGE_SIZE-1))
> - / 8;
> - else
> + if (PAGE_SIZE <= (1 << 16)) {
> + if (uv_get_min_hub_revision_id() == 1)
> + ret = 0;
> + else
> + ret = ((uv_blade_processor_id() *
> + L1_CACHE_BYTES) % PAGE_SIZE) / 8;
> + } else

That 64K PAGE_SIZE check in the ioctl looks rather weird. What is the purpose
of it?

Ingo


\
 
 \ /
  Last update: 2010-01-20 09:13    [W:0.792 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site