public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
	Linux FS Maling List <linux-fsdevel@vger.kernel.org>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Subject: Re: [PATCH v2 3/4] fat: mark superblock as dirty less often
Date: Sat, 14 Apr 2012 18:17:32 +0900	[thread overview]
Message-ID: <87k41ihdub.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1334326795-2446-4-git-send-email-dedekind1@gmail.com> (Artem Bityutskiy's message of "Fri, 13 Apr 2012 17:19:54 +0300")

Artem Bityutskiy <dedekind1@gmail.com> writes:

> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>
> This patch is a preparation for further changes. It touches few functions
> in fatent.c and prevents them from marking the superblock as dirty
> unnecessarily often. Namely, instead of marking it as dirty in the internal
> tight loops - do it only once at the end of the functions. And instead of
> marking it as dirty while holding the FAT table lock, do it outside the lock.
>
> The reason for this patch is that marking the superblock as dirty will soon
> become a little bit heavier operation, so it is cleaner to do this only when it
> is necessary.

For it, please use local variable like,


{
       	int fsinfo_dirty = 0;

	while (1) {
        	change free_clusters
                fsinfo_dirty = 1;
        }

        if (fsinfo_dirty)
        	mark_fsinfo_dirty()
}

instead of dirty it always.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2012-04-14  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 14:19 [PATCH v2 v2 0/4] do not use s_dirt in FAT FS Artem Bityutskiy
2012-04-13 14:19 ` [PATCH v2 1/4] fat: introduce special inode for managing the FSINFO block Artem Bityutskiy
2012-04-13 14:19 ` [PATCH v2 2/4] fat: introduce mark_fsinfo_dirty helper Artem Bityutskiy
2012-04-13 14:19 ` [PATCH v2 3/4] fat: mark superblock as dirty less often Artem Bityutskiy
2012-04-14  9:17   ` OGAWA Hirofumi [this message]
2012-04-14 10:24     ` Artem Bityutskiy
2012-04-14 10:37       ` OGAWA Hirofumi
2012-04-14 11:08         ` Artem Bityutskiy
2012-04-13 14:19 ` [PATCH v2 4/4] fat: switch to fsinfo_inode Artem Bityutskiy
2012-04-14 10:19   ` OGAWA Hirofumi
2012-04-14 10:29     ` Artem Bityutskiy
2012-04-14 10:36       ` OGAWA Hirofumi
2012-04-14 11:01         ` Artem Bityutskiy
2012-04-14 11:51           ` OGAWA Hirofumi
2012-04-14 12:36             ` Artem Bityutskiy
2012-04-14 13:12               ` OGAWA Hirofumi
2012-04-14 13:54                 ` Artem Bityutskiy
2012-05-04 10:13                 ` Artem Bityutskiy

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=87k41ihdub.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox