lkml.org 
[lkml]   [2013]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] tracing: Check cpu file on tracing_release()
From
Date
On Wed, 2013-04-10 at 09:36 +0900, Namhyung Kim wrote:

> You meant iter->cpu_file != RING_BUFFER_ALL_CPUS case, right?

Yep.

>
> So why bother trying to check other cpus then?

Because it's a very slow path (closing a file), and it keeps the code
simpler and more condense.

We could add your change for consistency, but right now, its very low
priority.

But looking at the code, I do see a clean up that looks like it would be
worth updating. If the ring_buffer_read_prepare() fails, we should
probably let the user know, instead of succeeding and then having no
output.

Looks like all users of the buffer_iter[cpu] will fail quietly if it is
NULL, thus it's not a problem with crashing the kernel.

-- Steve




\
 
 \ /
  Last update: 2013-04-10 03:01    [W:0.051 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site