All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] remove the second arg of do_timer_interrupt()
@ 2005-08-19 23:38 Adrian Bunk
  2005-08-20  8:01 ` [2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize() Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-08-19 23:38 UTC (permalink / raw)
  To: linux-kernel

The second arg of do_timer_interrupt() is not used in the functions, and 
all callers pass NULL.

Is there any reason not to remove it?


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 arch/i386/kernel/time.c |    5 ++---
 arch/sh/kernel/time.c   |    4 ++--
 arch/sh64/kernel/time.c |    4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

--- linux-2.6.13-rc6-mm1-full/arch/i386/kernel/time.c.old	2005-08-20 00:10:36.000000000 +0200
+++ linux-2.6.13-rc6-mm1-full/arch/i386/kernel/time.c	2005-08-20 00:11:02.000000000 +0200
@@ -252,8 +252,7 @@
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
  */
-static inline void do_timer_interrupt(int irq, void *dev_id,
-					struct pt_regs *regs)
+static inline void do_timer_interrupt(int irq, struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_IO_APIC
 	if (timer_ack) {
@@ -307,7 +306,7 @@
 
 	cur_timer->mark_offset();
  
-	do_timer_interrupt(irq, NULL, regs);
+	do_timer_interrupt(irq, regs);
 
 	write_sequnlock(&xtime_lock);
 	return IRQ_HANDLED;
--- linux-2.6.13-rc6-mm1-full/arch/sh/kernel/time.c.old	2005-08-20 00:11:21.000000000 +0200
+++ linux-2.6.13-rc6-mm1-full/arch/sh/kernel/time.c	2005-08-20 00:11:35.000000000 +0200
@@ -234,7 +234,7 @@
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
  */
-static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static inline void do_timer_interrupt(int irq, struct pt_regs *regs)
 {
 	do_timer(regs);
 #ifndef CONFIG_SMP
@@ -285,7 +285,7 @@
 	 * locally disabled. -arca
 	 */
 	write_seqlock(&xtime_lock);
-	do_timer_interrupt(irq, NULL, regs);
+	do_timer_interrupt(irq, regs);
 	write_sequnlock(&xtime_lock);
 
 	return IRQ_HANDLED;
--- linux-2.6.13-rc6-mm1-full/arch/sh64/kernel/time.c.old	2005-08-20 00:11:49.000000000 +0200
+++ linux-2.6.13-rc6-mm1-full/arch/sh64/kernel/time.c	2005-08-20 00:12:00.000000000 +0200
@@ -303,7 +303,7 @@
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
  */
-static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static inline void do_timer_interrupt(int irq, struct pt_regs *regs)
 {
 	unsigned long long current_ctc;
 	asm ("getcon cr62, %0" : "=r" (current_ctc));
@@ -361,7 +361,7 @@
 	 * locally disabled. -arca
 	 */
 	write_lock(&xtime_lock);
-	do_timer_interrupt(irq, NULL, regs);
+	do_timer_interrupt(irq, regs);
 	write_unlock(&xtime_lock);
 
 	return IRQ_HANDLED;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize()
  2005-08-19 23:38 [RFC: 2.6 patch] remove the second arg of do_timer_interrupt() Adrian Bunk
@ 2005-08-20  8:01 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2005-08-20  8:01 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

This patch removes unnecessary critical section in ksize() function, as cli/sti are rather expensive on modern CPUS.


Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>


[-- Attachment #2: patch_ksize --]
[-- Type: text/plain, Size: 433 bytes --]

diff -Nru linux-2.6.13-rc6-ed/mm/slab.c linux-2.6.13-rc6/mm/slab.c
--- linux-2.6.13-rc6-ed/mm/slab.c	2005-08-20 09:22:29.000000000 +0200
+++ linux-2.6.13-rc6/mm/slab.c	2005-08-20 09:39:42.000000000 +0200
@@ -3080,10 +3080,8 @@
 	unsigned int size = 0;
 
 	if (likely(objp != NULL)) {
-		local_irq_save(flags);
 		c = GET_PAGE_CACHE(virt_to_page(objp));
 		size = kmem_cache_size(c);
-		local_irq_restore(flags);
 	}
 
 	return size;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-20  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19 23:38 [RFC: 2.6 patch] remove the second arg of do_timer_interrupt() Adrian Bunk
2005-08-20  8:01 ` [2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize() Eric Dumazet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.