mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Dimitri Sivanich <sivanich@sgi.com>
Cc: linux-kernel@vger.kernel.org, Jack Steiner <steiner@sgi.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	tglx@linutronix.de
Subject: Re: [PATCH] x86, UV: Fix RTC latency bug by reading replicated cachelines
Date: Wed, 20 Jan 2010 09:10:20 +0100	[thread overview]
Message-ID: <20100120081020.GG20621@elte.hu> (raw)
In-Reply-To: <20100119144137.GB22276@sgi.com>


* 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

  reply	other threads:[~2010-01-20  8:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 21:09 [PATCH] x86, UV: Add function retrieving node controller revision number Jack Steiner
2010-01-13  9:24 ` Ingo Molnar
2010-01-14 18:34   ` [PATCH] x86, UV: Read RTC using replicated cachelines Dimitri Sivanich
2010-01-19 14:41     ` [PATCH] x86, UV: Fix RTC latency bug by reading " Dimitri Sivanich
2010-01-20  8:10       ` Ingo Molnar [this message]
2010-01-22 15:40         ` Dimitri Sivanich
2010-01-22 15:41         ` Dimitri Sivanich
2010-01-27 13:17           ` [tip:x86/urgent] " tip-bot for Dimitri Sivanich
2010-01-15 19:24 ` [tip:x86/urgent] x86, uv: Add function retrieving node controller revision number tip-bot for Jack Steiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100120081020.GG20621@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sivanich@sgi.com \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome