[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081113131939.GA2669@elte.hu>
Date: Thu, 13 Nov 2008 14:19:39 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Pekka Paalanen <pq@....fi>,
Frederic Weisbecker <fweisbec@...il.com>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH v2 1/1] ftrace: do not update max buffer with no users
* Steven Rostedt <rostedt@...dmis.org> wrote:
> The line count is very misleading. The 83 insertions and deletions where
> moved code or indentation:
but that indentation is completely unnecessary:
> - ret = ring_buffer_resize(max_tr.buffer, val);
> - if (ret < 0) {
> - int r;
> - cnt = ret;
> - r = ring_buffer_resize(global_trace.buffer,
> - global_trace.entries);
> - if (r < 0) {
> - /* AARGH! We are left with different
> - * size max buffer!!!! */
> - WARN_ON(1);
> - tracing_disabled = 1;
> }
> - goto out;
> }
>
>
> + if (max_tr.buffer) {
> + ret = ring_buffer_resize(max_tr.buffer, val);
> + if (ret < 0) {
> + int r;
> + cnt = ret;
> + r = ring_buffer_resize(global_trace.buffer,
> + global_trace.entries);
> + if (r < 0) {
> + /* AARGH! We are left with different
> + * size max buffer!!!! */
> + WARN_ON(1);
> + tracing_disabled = 1;
> + }
> + goto out;
> }
> }
the obvious solution is to add this to ring_buffer_resize():
if (!buffer)
return size;
resizing a non-existent buffer should succeed. A two-liner patch. Not
160 lines of flux.
Really, you need to think _hard_ how to avoid invasive-looking changes
in late -rc's, because every extra line to review uses up precious
review resources.
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