From 68bf440bf36d239ff3cb27b34b95ea7911c7c5a6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 23 Sep 2005 17:24:04 +0200 Subject: [PATCH] [PATCH] kernel: kill irq save/restore It should not be needed anymore, the writes a per-CPU and the get_cpu()/put_cpu() will prevent preemption. --- ...ace-2.6.14-rc2-git-I0 => blk-trace-2.6.14-rc2-git-I1} | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) rename kernel/{blk-trace-2.6.14-rc2-git-I0 => blk-trace-2.6.14-rc2-git-I1} (98%) diff --git a/kernel/blk-trace-2.6.14-rc2-git-I0 b/kernel/blk-trace-2.6.14-rc2-git-I1 similarity index 98% rename from kernel/blk-trace-2.6.14-rc2-git-I0 rename to kernel/blk-trace-2.6.14-rc2-git-I1 index c4402e3..eea28af 100644 --- a/kernel/blk-trace-2.6.14-rc2-git-I0 +++ b/kernel/blk-trace-2.6.14-rc2-git-I1 @@ -273,8 +273,8 @@ diff --git a/mm/highmem.c b/mm/highmem.c * slow path */ --- /dev/null 2004-06-30 22:03:36.000000000 +0200 -+++ linux-2.6/drivers/block/blktrace.c 2005-09-23 17:17:32.000000000 +0200 -@@ -0,0 +1,230 @@ ++++ linux-2.6/drivers/block/blktrace.c 2005-09-23 17:22:55.000000000 +0200 +@@ -0,0 +1,227 @@ +#include +#include +#include @@ -290,7 +290,6 @@ diff --git a/mm/highmem.c b/mm/highmem.c + int rw, u32 what, int error, int pdu_len, void *pdu_data) +{ + struct blk_io_trace *t; -+ unsigned long flags; + int cpu; + + if (rw & (1 << BIO_RW_BARRIER)) @@ -325,11 +324,9 @@ diff --git a/mm/highmem.c b/mm/highmem.c + t->pid = current->pid; + memcpy(t->comm, current->comm, sizeof(t->comm)); + -+ local_irq_save(flags); + __relay_write(bt->rchan, t, sizeof(*t)); + if (pdu_len) + __relay_write(bt->rchan, pdu_data, pdu_len); -+ local_irq_restore(flags); + + put_cpu(); +} @@ -506,7 +503,7 @@ diff --git a/mm/highmem.c b/mm/highmem.c +module_init(blk_trace_init); + --- /dev/null 2004-06-30 22:03:36.000000000 +0200 -+++ linux-2.6/include/linux/blktrace.h 2005-09-23 17:17:02.000000000 +0200 ++++ linux-2.6/include/linux/blktrace.h 2005-09-23 17:20:00.000000000 +0200 @@ -0,0 +1,180 @@ +#ifndef BLKTRACE_H +#define BLKTRACE_H -- 2.25.1