10 Oct, 2008

1 commit

  • percpu_counter_sum_and_set() and percpu_counter_sum() is the same except
    the former updates the global counter after accounting. Since we are
    taking the fbc->lock to calculate the precise value of the counter in
    percpu_counter_sum() anyway, it should simply set fbc->count too, as the
    percpu_counter_sum_and_set() does.

    This patch merges these two interfaces into one.

    Signed-off-by: Mingming Cao
    Acked-by: Peter Zijlstra
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: "Theodore Ts'o"

    Mingming Cao
     

12 Jul, 2008

1 commit

  • Delayed allocation need to check free blocks at every write time.
    percpu_counter_read_positive() is not quit accurate. delayed
    allocation need a more accurate accounting, but using
    percpu_counter_sum_positive() is frequently is quite expensive.

    This patch added a new function to update center counter when sum
    per-cpu counter, to increase the accurate rate for next
    percpu_counter_read() and require less calling expensive
    percpu_counter_sum().

    Signed-off-by: Mingming Cao
    Signed-off-by: "Theodore Ts'o"

    Mingming Cao
     

30 Apr, 2008

1 commit

  • Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
    This allows us to see and set the various BDI specific variables.

    In particular this properly exposes the read-ahead window for all relevant
    users and /sys/block//queue/read_ahead_kb should be deprecated.

    With patient help from Kay Sievers and Greg KH

    [mszeredi@suse.cz]

    - split off NFS and FUSE changes into separate patches
    - document new sysfs attributes under Documentation/ABI
    - do bdi_class_init as a core_initcall, otherwise the "default" BDI
    won't be initialized
    - remove bdi_init_fmt macro, it's not used very much

    [akpm@linux-foundation.org: fix ia64 warning]
    Signed-off-by: Peter Zijlstra
    Cc: Kay Sievers
    Acked-by: Greg KH
    Cc: Trond Myklebust
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

20 Oct, 2007

1 commit

  • Some of the per-cpu counters and thus their locks are accessed from IRQ
    contexts. This can cause a deadlock if it interrupts a cpu-offline thread
    which is transferring a dead-cpu's counts to the global counter.

    Add appropriate IRQ protection in the cpu-hotplug callback path.

    Signed-off-by: Gautham R Shenoy
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gautham R Shenoy
     

17 Oct, 2007

8 commits


17 Jul, 2007

2 commits

  • Now that we have implemented hotunplug-time counter spilling,
    percpu_counter_sum() only needs to look at online CPUs.

    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • per-cpu counters presently must iterate over all possible CPUs in the
    exhaustive percpu_counter_sum().

    But it can be much better to only iterate over the presently-online CPUs. To
    do this, we must arrange for an offlined CPU's count to be spilled into the
    counter's central count.

    We can do this for all percpu_counters in the machine by linking them into a
    single global list and walking that list at CPU_DEAD time.

    (I hope. Might have race windows in which the percpu_counter_sum() count is
    inaccurate?)

    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

23 Jun, 2006

2 commits

  • The percpu counter data type are changed in this set of patches to support
    more users like ext3 who need more than 32 bit to store the free blocks
    total in the filesystem.

    - Generic perpcu counters data type changes. The size of the global counter
    and local counter were explictly specified using s64 and s32. The global
    counter is changed from long to s64, while the local counter is changed from
    long to s32, so we could avoid doing 64 bit update in most cases.

    - Users of the percpu counters are updated to make use of the new
    percpu_counter_init() routine now taking an additional parameter to allow
    users to pass the initial value of the global counter.

    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • - Move percpu_counter routines from mm/swap.c to lib/percpu_counter.c

    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai