| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare() |
| From: | Tejun Heo <tj@xxxxxxxxxx> |
| Date: | Thu, 14 May 2015 11:02:30 -0400 |
| Cc: | xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9hCKGN3zioVEuaPX3SHw+nO2L5+0jXi3Y+cg4TZWotA=; b=ZPZ2u2/f4UYDZA/dETiRL+tc7Vl2iB4YPE1JJLZq6ymqbPB6bRs5hLbTTm90/w6Jb1 hdDC9AppUTasVUvbPRt21w162sHQihE8Jer+AIVet+Kon80rnd9gwCiwe/nLtBVpt2hX LH3du0UpV1upuMb8ps2s3MRa7T1cDovI4h9287oh0k0Aq2PMopoQ7iptWj1nBlC1SJCb TLzkBdTYu3d+baipP3ZUxJQ+//4Gv+cXyeCjHTQ5cztoS7xysvjaqSnB8TlQupY4GEQ+ aBtGTXlyvbLSqyt6IswxNuioeRIuSwF59PDJ9g/44amPm8dqNCHKSihyWtOeMkFHGDIe CldQ== |
| In-reply-to: | <20150514005553.GD4316@dastard> |
| References: | <1431474754-15764-1-git-send-email-david@xxxxxxxxxxxxx> <1431474754-15764-2-git-send-email-david@xxxxxxxxxxxxx> <20150513135919.GS11388@xxxxxxxxxxxxxxx> <20150514005553.GD4316@dastard> |
| Sender: | Tejun Heo <htejun@xxxxxxxxx> |
| User-agent: | Mutt/1.5.23 (2014-03-12) |
On Thu, May 14, 2015 at 10:55:53AM +1000, Dave Chinner wrote: > percpu_counter: batch size aware __percpu_counter_compare() > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > XFS uses non-stanard batch sizes for avoiding frequent global > counter updates on it's allocated inode counters, as they increment > or decrement in batches of 64 inodes. Hence the standard percpu > counter batch of 32 means that the counter is effectively a global > counter. Currently Xfs uses a batch size of 128 so that it doesn't > take the global lock on every single modification. > > However, Xfs also needs to compare accurately against zero, which > means we need to use percpu_counter_compare(), and that has a > hard-coded batch size of 32, and hence will spuriously fail to > detect when it is supposed to use precise comparisons and hence > the accounting goes wrong. > > Add __percpu_counter_compare() to take a custom batch size so we can > use it sanely in XFS and factor percpu_counter_compare() to use it. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Acked-by: Tejun Heo <tj@xxxxxxxxxx> Please feel free to route the patch however you see fit. Thanks. -- tejun |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] xfs_repair: properly detect reserved attribute names, Brian Foster |
|---|---|
| Next by Date: | Re: [PATCH] xfs_repair: properly detect reserved attribute names, Eric Sandeen |
| Previous by Thread: | Re: [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare(), Dave Chinner |
| Next by Thread: | [PATCH 2/2] xfs: inode and free block counters need to use __percpu_counter_compare, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |