<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/oprofile/cpu_buffer.c, branch v5.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-01-13T18:19:38Z</updated>
<entry>
<title>tracing: Make struct ring_buffer less ambiguous</title>
<updated>2020-01-13T18:19:38Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2019-12-13T18:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13292494379f92f532de71b31a54018336adc589'/>
<id>urn:sha1:13292494379f92f532de71b31a54018336adc589</id>
<content type='text'>
As there's two struct ring_buffers in the kernel, it causes some confusion.
The other one being the perf ring buffer. It was agreed upon that as neither
of the ring buffers are generic enough to be used globally, they should be
renamed as:

   perf's ring_buffer -&gt; perf_buffer
   ftrace's ring_buffer -&gt; trace_buffer

This implements the changes to the ring buffer that ftrace uses.

Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.home

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for the removal of &lt;asm/ptrace.h&gt; from &lt;linux/sched.h&gt;</title>
<updated>2017-03-02T07:42:31Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-03T09:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cf421e55d69016989548e0fb8585e69f54bd283'/>
<id>urn:sha1:4cf421e55d69016989548e0fb8585e69f54bd283</id>
<content type='text'>
Fix up missing #includes in other places that rely on sched.h doing that for them.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/oprofile: Replace __get_cpu_var uses for address calculation</title>
<updated>2014-08-26T17:45:46Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2014-08-17T17:30:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=879d92745a1a5a6573dee83cfa2953413fed23fc'/>
<id>urn:sha1:879d92745a1a5a6573dee83cfa2953413fed23fc</id>
<content type='text'>
Replace the uses of __get_cpu_var for address calculation with this_cpu_ptr.

Cc: Robert Richter &lt;rric@kernel.org&gt;
Cc: oprofile-list@lists.sf.net
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>oprofile: Remove 'WQ on CPUx, prefer CPUy' warning</title>
<updated>2012-08-27T12:49:39Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2012-08-22T07:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61bccf191fe2d55b8d003b4ea3f94913745aaefa'/>
<id>urn:sha1:61bccf191fe2d55b8d003b4ea3f94913745aaefa</id>
<content type='text'>
Under certain workloads we see the following warnings:

 WQ on CPU0, prefer CPU1
 WQ on CPU0, prefer CPU2
 WQ on CPU0, prefer CPU3

It warns the user that the wq to access a per-cpu buffers runs not on
the same cpu. This happens if the wq is rescheduled on a different cpu
than where the buffer is located. This was probably implemented to
detect performance issues. Not sure if there actually is one as the
buffers are copied to a single buffer anyway which should be the
actual bottleneck.

We wont change WQ implementation. Since a user can do nothing the
warning is pointless. Removing it.

Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: Introduce new oprofile sample add function (oprofile_add_ext_hw_sample)</title>
<updated>2011-02-15T10:07:07Z</updated>
<author>
<name>Heinz Graalfs</name>
<email>graalfs@linux.vnet.ibm.com</email>
</author>
<published>2011-01-21T10:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54ebbe7ba51d97a28a9a406203d171d61858e4b9'/>
<id>urn:sha1:54ebbe7ba51d97a28a9a406203d171d61858e4b9</id>
<content type='text'>
This patch introduces a new oprofile sample add function
(oprofile_add_ext_hw_sample) that can also take task_struct as an
argument, which is used by the hwsampler kernel module when copying
hardware samples to OProfile buffers.

Applied with following changes:
* removed #include &lt;linux/module.h&gt;
* whitespace changes
* removed conditional compilation (CONFIG_HAVE_HWSAMPLER)
* modified order of functions
* fix missing function definition in header file

Signed-off-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Maran Pakkirisamy &lt;maranp@linux.vnet.ibm.com&gt;
Signed-off-by: Heinz Graalfs &lt;graalfs@linux.vnet.ibm.com&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: Remove deprecated use of flush_scheduled_work()</title>
<updated>2010-10-29T09:54:18Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-10-15T13:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5'/>
<id>urn:sha1:3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5</id>
<content type='text'>
flush_scheduled_work() is deprecated and scheduled to be removed.
sync_stop() currently cancels cpu_buffer works inside buffer_mutex and
flushes the system workqueue outside.  Instead, split end_cpu_work()
into two parts - stopping further work enqueues and flushing works -
and do the former inside buffer_mutex and latter outside.

For stable kernels v2.6.35.y and v2.6.36.y.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: stable@kernel.org
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: fix crash when accessing freed task structs</title>
<updated>2010-08-25T07:09:09Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2010-08-13T14:29:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=750d857c682f4db60d14722d430c7ccc35070962'/>
<id>urn:sha1:750d857c682f4db60d14722d430c7ccc35070962</id>
<content type='text'>
This patch fixes a crash during shutdown reported below. The crash is
caused by accessing already freed task structs. The fix changes the
order for registering and unregistering notifier callbacks.

All notifiers must be initialized before buffers start working. To
stop buffer synchronization we cancel all workqueues, unregister the
notifier callback and then flush all buffers. After all of this we
finally can free all tasks listed.

This should avoid accessing freed tasks.

On 22.07.10 01:14:40, Benjamin Herrenschmidt wrote:

&gt; So the initial observation is a spinlock bad magic followed by a crash
&gt; in the spinlock debug code:
&gt;
&gt; [ 1541.586531] BUG: spinlock bad magic on CPU#5, events/5/136
&gt; [ 1541.597564] Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6b6d03
&gt;
&gt; Backtrace looks like:
&gt;
&gt;       spin_bug+0x74/0xd4
&gt;       ._raw_spin_lock+0x48/0x184
&gt;       ._spin_lock+0x10/0x24
&gt;       .get_task_mm+0x28/0x8c
&gt;       .sync_buffer+0x1b4/0x598
&gt;       .wq_sync_buffer+0xa0/0xdc
&gt;       .worker_thread+0x1d8/0x2a8
&gt;       .kthread+0xa8/0xb4
&gt;       .kernel_thread+0x54/0x70
&gt;
&gt; So we are accessing a freed task struct in the work queue when
&gt; processing the samples.

Reported-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: stable@kernel.org
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: protect from not being in an IRQ context</title>
<updated>2010-05-03T21:02:39Z</updated>
<author>
<name>Phil Carmody</name>
<email>ext-phil.2.carmody@nokia.com</email>
</author>
<published>2010-04-28T17:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9414e99672271adcc661f3c160a30b374179b92f'/>
<id>urn:sha1:9414e99672271adcc661f3c160a30b374179b92f</id>
<content type='text'>
http://lkml.org/lkml/2010/4/27/285

Protect against dereferencing regs when it's NULL, and
force a magic number into pc to prevent too deep processing.
This approach permits the dropped samples to be tallied as
invalid Instruction Pointer events.

e.g. output from about 15mins at 10kHz sample rate:
Nr. samples received: 2565380
Nr. samples lost invalid pc: 4

Signed-off-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge commit 'tip/tracing/core' into oprofile/core</title>
<updated>2010-04-23T14:47:51Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2010-04-23T14:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b971f06187d83b5c03d2b597cccdfef421c0ca91'/>
<id>urn:sha1:b971f06187d83b5c03d2b597cccdfef421c0ca91</id>
<content type='text'>
Conflicts:
	drivers/oprofile/cpu_buffer.c

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: remove double ring buffering</title>
<updated>2010-04-23T13:30:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-04-01T01:17:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb6e943ccf19ab6d3189147e9d625a992e016084'/>
<id>urn:sha1:cb6e943ccf19ab6d3189147e9d625a992e016084</id>
<content type='text'>
oprofile used a double buffer scheme for its cpu event buffer
to avoid races on reading with the old locked ring buffer.

But that is obsolete now with the new ring buffer, so simply
use a single buffer. This greatly simplifies the code and avoids
a lot of sample drops on large runs, especially with call graph.

Based on suggestions from Steven Rostedt

For stable kernels from v2.6.32, but not earlier.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
</feed>
