[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090507082303.GE12285@elte.hu>
Date: Thu, 7 May 2009 10:23:03 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Li Zefan <lizf@...fujitsu.com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 1/7] ring-buffer: remove unneeded conditional in
rb_reserve_next
* Steven Rostedt <rostedt@...dmis.org> wrote:
> From: Steven Rostedt <srostedt@...hat.com>
>
> The code in __rb_reserve_next checks on page overflow if it is the
> original commiter and then resets the page back to the original
> setting. Although this is fine, and the code is correct, it is
> a bit fragil. Some experimental work I did breaks it easily.
s/fragil/fragile
> The better and more robust solution is to have all commiters that
> overflow the page, simply subtract what they added.
>
> [ Impact: more robust ring buffer account management ]
it's a bit faster too (eliminates two branches) - so a
micro-optimization as well.
Ingo
--
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