All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2 v2] percpu_counter: xfs requires custom compare batch size
@ 2015-05-12 23:52 ` Dave Chinner
  0 siblings, 0 replies; 26+ messages in thread
From: Dave Chinner @ 2015-05-12 23:52 UTC (permalink / raw)
  To: xfs; +Cc: linux-kernel, peterz, tj

Hi folks,

This is v2 of the regression fix for the new generic per-cpu
superblock counter code in XFS. The problems fixed arise from using
custom batch sizes for addition and decrement exceeding the
"accurate compare" bounds in percpu_counter_compare() and hence
resulting in incorrect comparisons being made.

This regression was introduced in 4.1-rc1 and it requires a small
tweak to the percpu counter infrastructure to fix, hence the two
patches.

Comments welcome!

-Dave.

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH 0/2] xfs: fix inode count underrun
@ 2015-05-05 22:01 Dave Chinner
  2015-05-05 22:01   ` Dave Chinner
  0 siblings, 1 reply; 26+ messages in thread
From: Dave Chinner @ 2015-05-05 22:01 UTC (permalink / raw)
  To: xfs; +Cc: linux-kernel

Hi folks,

With the conversion of XFS to use the generic per-cpu superblocks, I
overlooked the fact that the update batch size is important to the
accuracy of the comparison function. Using different batch sizes
means percpu_counter_compare() doesn't detect when it should fall
back to percpu_counter_sum() for accuracy correctly, resulting in
counter comparisons being inaccurate. This leads to problems with
zero threshold detection in XFS.

To fix, add __percpu_counter_compare() to take a caller supplied
batch size. This fixes the XFS regression introduced in 4.1-rc1.

-Dave.


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-05-14 15:02 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 23:52 [PATCH 0/2 v2] percpu_counter: xfs requires custom compare batch size Dave Chinner
2015-05-12 23:52 ` Dave Chinner
2015-05-12 23:52 ` [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare() Dave Chinner
2015-05-12 23:52   ` Dave Chinner
2015-05-13 13:59   ` Tejun Heo
2015-05-13 13:59     ` Tejun Heo
2015-05-14  0:55     ` Dave Chinner
2015-05-14  0:55       ` Dave Chinner
2015-05-14 15:02       ` Tejun Heo
2015-05-14 15:02         ` Tejun Heo
2015-05-12 23:52 ` [PATCH 2/2] xfs: inode and free block counters need to use __percpu_counter_compare Dave Chinner
2015-05-12 23:52   ` Dave Chinner
2015-05-14 14:21   ` Brian Foster
2015-05-14 14:21     ` Brian Foster
  -- strict thread matches above, loose matches on Subject: below --
2015-05-05 22:01 [PATCH 0/2] xfs: fix inode count underrun Dave Chinner
2015-05-05 22:01 ` [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare() Dave Chinner
2015-05-05 22:01   ` Dave Chinner
2015-05-06  4:36   ` Christoph Hellwig
2015-05-06  4:36     ` Christoph Hellwig
2015-05-06  4:46     ` Christoph Hellwig
2015-05-06  4:46       ` Christoph Hellwig
2015-05-06  5:43     ` Dave Chinner
2015-05-06  5:43       ` Dave Chinner
2015-05-06  5:53       ` Dave Chinner
2015-05-06  5:53         ` Dave Chinner
2015-05-06  6:11         ` Dave Chinner
2015-05-06  6:11           ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.