LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

A possible "bug" in ip_vs_timer.c

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: A possible "bug" in ip_vs_timer.c
From: Isaac Claymore <clay@xxxxxxxxxxxxxx>
Date: Tue, 15 Jan 2002 09:26:15 +0800
Hi, all
    This might not be called a bug, however, I'd like to point it out.
    I met a comment in internal_add_sltimer() of file ip_vs_timer.c:
        /*
         * must be cli-ed when calling this
         */
    But later I found when internal_add_sltimer() is invoked in add_sltimer() 
and
other places, HardIRQ isn't blocked, and plain vanilla spin_[un]lock() is used. 
And according to that comment above, spin_lock_irqsave() & 
spin_unlock_irqrestore()
should be used instead. This confused me :)
    Later after I checked the timer.c in kernel source, I found that you LVS 
developers
just copied the comment from timer.c. And since LVS slow timers isn't used in 
HardIRQ
context like those kernel timers, we need not cli().
    You guys had successfully converted the irq-block version of spinlock 
routines of
timer.c in ip_vs_timer.c, but missed that comment.
    OK, this is never a serious problem. But it might cause confusion among us 
newbies.
    If I'm right about this, would you maintainers correct it? Or, otherwise, 
beat me :)
 


<Prev in Thread] Current Thread [Next in Thread>