From: Andrew Morton <akpm@linux-foundation.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Hugh Dickins <hughd@google.com>,
yanmin.zhang@intel.com
Subject: Re: [PATCH v3 2/2] tmpfs: Make tmpfs scalable with percpu_counter for used blocks
Date: Thu, 17 Jun 2010 21:08:59 -0700 [thread overview]
Message-ID: <20100617210859.40e024a1.akpm@linux-foundation.org> (raw)
In-Reply-To: <AANLkTikOpTsdxhjqE0G3oEv9qT2nRFp3y5fjDUqXlw4X@mail.gmail.com>
On Fri, 18 Jun 2010 10:35:51 +0900 Minchan Kim <minchan.kim@gmail.com> wrote:
> > __struct shmem_sb_info {
> > __ __ __ __unsigned long max_blocks; __ /* How many blocks are allowed */
> > - __ __ __ unsigned long free_blocks; __/* How many are left for allocation */
> > + __ __ __ struct percpu_counter used_blocks; __/* How many are allocated */
>
> Just a nitpick.
> Why do you change free_blocks and used_blocks?
> I think we can use free_blocks following as.
>
> ex)
> if (percpu_counter_compare(&sbinfo->free_blocks, 0))
See previous lengthy discussion ;)
If we count free_blocks then we need to alter the value of free_blocks
in remount_fs, and reinitialising distributed counters on-the-fly is
ugly.
I suppose we could have done it by doing a large add or sub in
remount_fs, and keeping track of the exact value of free_blocks
elsewhere in the superblock, but it's far simpler this way.
next prev parent reply other threads:[~2010-06-18 4:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 23:56 [PATCH v3 2/2] tmpfs: Make tmpfs scalable with percpu_counter for used blocks Tim Chen
2010-06-18 1:35 ` Minchan Kim
2010-06-18 4:08 ` Andrew Morton [this message]
2010-06-20 14:28 ` Minchan Kim
2010-06-21 20:18 ` Andrew Morton
2010-06-22 2:52 ` Tim Chen
2010-06-22 16:52 ` Tim Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100617210859.40e024a1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ak@linux.intel.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--cc=tim.c.chen@linux.intel.com \
--cc=yanmin.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.