Message ID | 1441843731.26961.14.camel@au1.ibm.com |
---|---|
State | Rejected |
Headers | show |
On Thu, 2015-09-10 at 10:08 +1000, Benjamin Herrenschmidt wrote: > Use a 2s timer instead. TIMER_POLL can fire a *lot* when there is > console > activity and I would like to mostly get rid of it. > > We should still stop using that timer completely when interrupts are > working unless there's an active request, in which case we can arm it > for timeouts. Drop that one. Arguably TIMER_POLL is still a better way to handle the case where interrupts aren't working during boot, xmon etc... we can discuss that separately. Pathes 1 and 3 are independent from that one and should still apply > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > hw/bt.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/hw/bt.c b/hw/bt.c > index 41fe24e..42db3f3 100644 > --- a/hw/bt.c > +++ b/hw/bt.c > @@ -39,8 +39,11 @@ > #define BT_INTMASK_B2H_IRQ 0x02 > #define BT_INTMASK_BMC_HWRST 0x80 > > -/* Default poll interval before interrupts are working */ > -#define BT_DEFAULT_POLL_MS 200 > +/* Poll interval before interrupts are working */ > +#define BT_NOIRQ_POLL_MS 200 > + > +/* Poll interval when interrupts are working (for timeouts) */ > +#define BT_IRQ_POLL_MS 2000 > > /* > * Minimum size of an IPMI request/response including > @@ -52,8 +55,6 @@ > /* > * How long (in uS) to poll for new ipmi data. > */ > -#define POLL_TIMEOUT 10000 > - > /* > * Maximum number of outstanding messages to allow in the queue. > */ > @@ -393,7 +394,9 @@ static void bt_poll(struct timer *t __unused, > void *data __unused, > bt_send_and_unlock(); > > schedule_timer(&bt.poller, > - bt.irq_ok ? TIMER_POLL : > msecs_to_tb(BT_DEFAULT_POLL_MS)); > + bt.irq_ok ? > + msecs_to_tb(BT_IRQ_POLL_MS) : > + msecs_to_tb(BT_NOIRQ_POLL_MS)); > } > > static void bt_add_msg(struct bt_msg *bt_msg) > @@ -551,7 +554,7 @@ void bt_init(void) > * least until we have at least one interrupt occurring at > which > * point we turn it into a background poller > */ > - schedule_timer(&bt.poller, msecs_to_tb(BT_DEFAULT_POLL_MS)); > + schedule_timer(&bt.poller, msecs_to_tb(BT_NOIRQ_POLL_MS)); > > irq = dt_prop_get_u32(n, "interrupts"); > bt_lpc_client.interrupts = LPC_IRQ(irq); > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot
diff --git a/hw/bt.c b/hw/bt.c index 41fe24e..42db3f3 100644 --- a/hw/bt.c +++ b/hw/bt.c @@ -39,8 +39,11 @@ #define BT_INTMASK_B2H_IRQ 0x02 #define BT_INTMASK_BMC_HWRST 0x80 -/* Default poll interval before interrupts are working */ -#define BT_DEFAULT_POLL_MS 200 +/* Poll interval before interrupts are working */ +#define BT_NOIRQ_POLL_MS 200 + +/* Poll interval when interrupts are working (for timeouts) */ +#define BT_IRQ_POLL_MS 2000 /* * Minimum size of an IPMI request/response including @@ -52,8 +55,6 @@ /* * How long (in uS) to poll for new ipmi data. */ -#define POLL_TIMEOUT 10000 - /* * Maximum number of outstanding messages to allow in the queue. */ @@ -393,7 +394,9 @@ static void bt_poll(struct timer *t __unused, void *data __unused, bt_send_and_unlock(); schedule_timer(&bt.poller, - bt.irq_ok ? TIMER_POLL : msecs_to_tb(BT_DEFAULT_POLL_MS)); + bt.irq_ok ? + msecs_to_tb(BT_IRQ_POLL_MS) : + msecs_to_tb(BT_NOIRQ_POLL_MS)); } static void bt_add_msg(struct bt_msg *bt_msg) @@ -551,7 +554,7 @@ void bt_init(void) * least until we have at least one interrupt occurring at which * point we turn it into a background poller */ - schedule_timer(&bt.poller, msecs_to_tb(BT_DEFAULT_POLL_MS)); + schedule_timer(&bt.poller, msecs_to_tb(BT_NOIRQ_POLL_MS)); irq = dt_prop_get_u32(n, "interrupts"); bt_lpc_client.interrupts = LPC_IRQ(irq);
Use a 2s timer instead. TIMER_POLL can fire a *lot* when there is console activity and I would like to mostly get rid of it. We should still stop using that timer completely when interrupts are working unless there's an active request, in which case we can arm it for timeouts. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- hw/bt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)