Török Edwin wrote:
> Hi,
>
> On latest -git of 2.6.25 I am getting lots of wakeups from xfsaild.
>   23.5% ( 33.3)           xfsaild : schedule_timeout (process_timeout)
>   

[Should I Cc: xfs mailing list / lkml on this?]

The problem seems to be with the timeout logic in xfsaild_push, which
can return 3 timeout values (msecs): 1000, 10, 20, 30.
I inserted a marker and attached a probe function, schedule_timeout
always got called with 9 jiffies (which is 30 msecs, I have HZ=300).

Changing xfs_trans_ail.c:270 from "tout += 20" to "tout = 1000", made
xfsaild only do 1 wakeup/s instead of 33!

For some reason xfs_aild always thinks it has work (I/O) to do, and
never chooses the 1000 msec sleep value.

I think the max timeout value should be correlated with
/proc/sys/vm/dirty_writeback_centisecs (instead of the hardcoded 1000),
and sleeping for very short intervals should only be done if there is a
lot of I/O to be done.

Or maybe an exponential backoff starting from 10 msecs, and growing up
to dirty_writeback_centisecs*10 if there is not a lot of work to be done.
When there is I/O to be done, the timeout value could be reset to 10
msecs again.

Thoughts?

Collecting data for 15 seconds
Cn              Avg residency
C0 (cpu running)        ( 0.3%)
C1          0.0ms ( 0.0%)
C2          0.0ms ( 0.0%)
C3         43.3ms (99.7%)
P-states (frequencies)
  1.67 Ghz     0.0%
  1333 Mhz     0.0%
  1000 Mhz   100.0%
Wakeups-from-idle per second : 23.1    interval: 15.0s
Power usage (ACPI estimate): 12.4W (4.1 hours)
Top causes for wakeups:
  36.4% (  7.7)     group_balance : schedule_timeout (process_timeout)
  16.6% (  3.5)      <kernel IPI> : Rescheduling interrupts
  10.0% (  2.1)              Xorg : do_setitimer (it_real_fn)
   6.3% (  1.3)       <interrupt> : ata_piix
   5.0% (  1.1)              Xorg : schedule_timeout (process_timeout)
   4.7% (  1.0)           xfsaild : schedule_timeout (process_timeout)


Best regards,
--Edwin

_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to