[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL26m8J29HA89m-r0EXRxn_hRoBkDksXXfgO4A12256i+0aamg@mail.gmail.com>
Date: Tue, 23 Aug 2011 12:20:14 -0700
From: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To: David Sharp <dhsharp@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Michael Rubin <mrubin@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/5] trace: Make removal of ring buffer pages atomic
On Tue, Aug 23, 2011 at 12:16 PM, David Sharp <dhsharp@...gle.com> wrote:
> On Tue, Aug 23, 2011 at 11:55 AM, Vaibhav Nagarnaik
> <vnagarnaik@...gle.com> wrote:
>> This patch adds the capability to remove pages from a ring buffer
>> without destroying any existing data in it.
>>
>> This is done by removing the pages after the tail page. This makes sure
>> that first all the empty pages in the ring buffer are removed. If the
>> head page is one in the list of pages to be removed, then the page after
>> the removed ones is made the head page. This removes the oldest data
>> from the ring buffer and keeps the latest data around to be read.
>>
>> To do this in a non-racey manner, tracing is stopped for a very short
>> time while the pages to be removed are identified and unlinked from the
>> ring buffer. The pages are freed after the tracing is restarted to
>> minimize the time needed to stop tracing.
>>
>> The context in which the pages from the per-cpu ring buffer are removed
>> runs on the respective CPU. This minimizes the events not traced to only
>> NMI trace contexts.
>
> "interrupt contexts". We're not disabling interrupts.
>
Since the reader_lock is held using spin_lock_irq(), there won't be IRQs
coming in, only the NMIs.
Vaibhav Nagarnaik
--
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