[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1410061426471.4383@nanos>
Date: Mon, 6 Oct 2014 14:28:26 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: David Lang <david@...g.hm>
cc: Christoph Lameter <cl@...ux.com>,
Richard Cochran <richardcochran@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: Why do we still have 32 bit counters? Interrupt counters overflow
within 50 days
On Mon, 6 Oct 2014, David Lang wrote:
> On Sun, 5 Oct 2014, Thomas Gleixner wrote:
>
> > >
> > > 64 bit counters on 32 bit machines are not an easy thing and could be
> >
> > Whats so hard about 64bit counters on 32bit machines?
> >
> > > expensive to handle in particular because these counters are used in
> > > performance critical hotpaths.
> >
> > The expensive overhead is a single "adcl" instruction.
>
> As I understand it, since the 64 bit math cannot be made atomic, it requires
> protecting the counter with a lock so that it can't be read while half
> updated. Aquiring a lock on every update is an expensive thing to do. It's not
> something people like to see in a fast path, especially for something of as
> low an importance as the counters.
As I said before. Both reader and writer side are already protected by
the irq descriptor lock. We take that lock anyway.
Thanks,
tglx
--
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