Skip to contentSkip to conversation

IPMI: add poll delay

PATCH In review Corey Minyard 3 participants 4 messages Dec 2, 2006 – Dec 5, 2006 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 7/12 IPMI: add poll delay

Make sure to delay a little in the IPMI poll routine so we can pass in a timeout time and thus time things out.

drivers/char/ipmi/ipmi_si_intf.c +6 -1
Index: linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
@@ -807,7 +807,12 @@ static void poll(void *send_info)
 {
 	struct smi_info *smi_info = send_info;
 
-	smi_event_handler(smi_info, 0);
+	/*
+	 * Make sure there is some delay in the poll loop so we can
+	 * drive time forward and timeout things.
+	 */
+	udelay(10);
+	smi_event_handler(smi_info, 10);
 }
 
 static void request_events(void *send_info)
#1 lore raw
Quoted 11 lines · On Fri, 1 Dec 2006 22:35:20 -0600 Corey Minyard <[email protected]> wrote:

Make sure to delay a little in the IPMI poll routine so we can pass in a timeout time and thus time things out.

Index: linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c
===================================================================

drivers/char/ipmi/ipmi_si_intf.c +0 -0
@@ -807,7 +807,12 @@ static void poll(void *send_info)
 {

drivers/char/ipmi/ipmi_si_intf.c static void poll(void *send_info) · line 816

Quoted 10 lines
drivers/char/ipmi/ipmi_si_intf.c +6 -1
 	struct smi_info *smi_info = send_info;
 
-	smi_event_handler(smi_info, 0);
+	/*
+	 * Make sure there is some delay in the poll loop so we can
+	 * drive time forward and timeout things.
+	 */
+	udelay(10);
+	smi_event_handler(smi_info, 10);
 }

I don't understand what this patch is doing. It looks fishy. More details, please?

#2 lore raw
Quoted 17 lines · Andrew Morton
Quoted 13 lines · On Fri, 1 Dec 2006 22:35:20 -0600 Corey Minyard <[email protected]> wrote:

Make sure to delay a little in the IPMI poll routine so we can pass in a timeout time and thus time things out.

Index: linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c
===================================================================

drivers/char/ipmi/ipmi_si_intf.c +0 -0
@@ -807,7 +807,12 @@ static void poll(void *send_info)
 {
 	struct smi_info *smi_info = send_info;
 
Quoted 13 lines

drivers/char/ipmi/ipmi_si_intf.c static void poll(void *send_info) · line 817

Quoted 9 lines
drivers/char/ipmi/ipmi_si_intf.c +6 -1
-	smi_event_handler(smi_info, 0);
+	/*
+	 * Make sure there is some delay in the poll loop so we can
+	 * drive time forward and timeout things.
+	 */
+	udelay(10);
+	smi_event_handler(smi_info, 10);
 }
 

I don't understand what this patch is doing. It looks fishy. More details, please?

Yeah, it does look a little fishy. This is a poll routine that is only called at panic
time; it is used to force things to happen in the driver without scheduling or
timers. The driver does this so it can set watchdog parameters and store panic information in the event log at panic time.

Without this change, if something goes wrong in the BMC the driver will never
time out the operation since it doesn't see time being driven forward. So this
makes sure the driver sees time advancing as it should.

-Corey

#3 lore raw
Quoted 38 lines · Corey Minyard
Quoted 17 lines · Andrew Morton
Quoted 13 lines · On Fri, 1 Dec 2006 22:35:20 -0600 Corey Minyard <[email protected]> wrote:

Make sure to delay a little in the IPMI poll routine so we can pass in a timeout time and thus time things out.

Index: linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c
===================================================================

drivers/char/ipmi/ipmi_si_intf.c +0 -0
@@ -807,7 +807,12 @@ static void poll(void *send_info)
 {
     struct smi_info *smi_info = send_info;
 
Quoted 13 lines

drivers/char/ipmi/ipmi_si_intf.c static void poll(void *send_info) · line 817

Quoted 9 lines
drivers/char/ipmi/ipmi_si_intf.c +6 -1
-    smi_event_handler(smi_info, 0);
+    /*
+     * Make sure there is some delay in the poll loop so we can
+     * drive time forward and timeout things.
+     */
+    udelay(10);
+    smi_event_handler(smi_info, 10);
 }
 

I don't understand what this patch is doing. It looks fishy. More details, please?

Yeah, it does look a little fishy. This is a poll routine that is only called at panic
time; it is used to force things to happen in the driver without scheduling or
timers. The driver does this so it can set watchdog parameters and store panic information in the event log at panic time.

Quoted 6 lines

Without this change, if something goes wrong in the BMC the driver will never
time out the operation since it doesn't see time being driven forward. So this
makes sure the driver sees time advancing as it should.

Hmm, I wonder if this could explain why some of my IBM servers become unreachable via IPMI after a kernel crash.

Signature · 3 lines
Jesper Juhl <[email protected]>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html