lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Oct 2011 13:04:57 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 0/3][RFC] trace_printk() using percpu buffers

On Sat, 2011-10-08 at 13:02 -0400, Steven Rostedt wrote:
> 
> Peter,
> 
> You had issues with the previous version of my trace_printk() code.
> I rewrote it to do the following.
> 
> By default, it still uses the single buffer protected by a spinlock
> and an atomic (for NMIs). The NMI case can cause dropped prints if
> the NMI happens while a trace_printk() is processing.

Why bother keeping that?

> When trace_printk_percpu is enabled, either via the trace options or
> the kernel command line, then two sets of percpu buffers are made,
> one for normal and irqs (interrupts are still disabled), and the other
> is for NMIs. These can be added or removed at anytime.

So why not allocate 4, one for {task, softirq, irq, NMI} resp, then all
you need to do is disable preemption.

depending on tracing/options/trace_printk ?

> The last patch adds a CONFIG_TRACE_PRINTK_PERCPU that makes trace_printk()
> permanently use two sets of per_cpu buffers, and these can not be
> removed. This will give the least amount of overhead for trace_printk()
> with the sacrifice of memory overhead. This is an option I could imagine
> you would just set and forget about.

Is that one dereference really that expensive?

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ