Re: Some interesting observations when trying to optimize vmstat handling

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <ak@...>
Cc: <linux-kernel@...>, <linux-mm@...>, Mathieu Desnoyers <mathieu.desnoyers@...>
Date: Thursday, November 8, 2007 - 7:25 pm

On Fri, 9 Nov 2007, Andi Kleen wrote:


Well maybe we should change local_irq_save/restore in general?

The result would be:


if (!in_interrupt())
	local_irq_disable()

<critical section>

if (!in_interrupt())
	local_irq_enable();



Somehow we need to remember that we disabled interrupts.

Then it get more complicated.


int interrupts_disabled = 0;

if (!in_interrupt()) {
	local_irq_disable():
	interrrupts_disabled = 1;
}

<critical section>

if (interrupts_disabled)
	local_irq_enable();



Not sure that this actually better.



The statistics code surely does not rely on that.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Some interesting observations when trying to optimize vm..., Jeremy Fitzhardinge, (Thu Nov 8, 8:19 pm)
Re: Some interesting observations when trying to optimize vm..., Christoph Lameter, (Thu Nov 8, 7:25 pm)