[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080804.151448.190011603.davem@davemloft.net>
Date: Mon, 04 Aug 2008 15:14:48 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: tony.luck@...el.com
Cc: nacc@...ibm.com, mingo@...e.hu, linux-ia64@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [BISECTION RESULT] sched: revert cpu_clock to
pre-27ec4407790d075c325e1f4da0a19c56953cce23 state
From: "Luck, Tony" <tony.luck@...el.com>
Date: Mon, 4 Aug 2008 15:10:40 -0700
> > Can you guys on IA64 possibly set ar.k3 simply to zero or to some
> > other similar value which cancels out the per-cpu computation?
> >
> > That's what sparc64 and other platforms do.
>
> In cpu_init() we set ar.k3 to the base physical address of the percpu
> area. The alt-dtlb miss handler uses this register to set up a
> TLB mapping from virtual address 0xffffffffffff0000 to this physical
> address.
>
> This means that most per-cpu accesses are very cheap (as the compiler
> can use a small -ve offset from register r0 to load the virtual
> address).
>
> Accessing ar.k3 is a bit slow ... so making the per-cpu code
> use that on every access to a per-cpu variable would be unpleasant.
I understand that you use TLB mappings.
What I'm suggesting is to very early on set ar.k3 to something which
makes accesses go through the __per_cpu image copy in the main kernel
image.
You could even set up a dummy TLB mapping during this early boot
period.
Otherwise it's just cleverness that is unique to IA64 and is going to
constantly run into issues like this. An alternative is to implement
your own sched_clock() et al. where you can adhere to whatever special
rules your platform may have.
--
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