All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Steven Rostedt <srostedt@redhat.com>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [PATCH 2/2] UBIFS: start using hrtimers
Date: Fri, 29 May 2009 16:58:10 +0300	[thread overview]
Message-ID: <4A1FE9F2.1050904@nokia.com> (raw)
In-Reply-To: <1243603957.23657.217.camel@twins>

Peter Zijlstra wrote:
> On Fri, 2009-05-29 at 18:09 +0300, Artem Bityutskiy wrote:
>> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
>> Subject: [PATCH 2/2] UBIFS: start using hrtimers
>>
>> UBIFS uses timers for write-buffer write-back. It is not
>> crucial for us to write-back exactly on time. We are fine
>> to write-back a little earlier or later. And this means
>> we may optimize UBIFS timer so that it could be groped
>> with a close timer event, so that the CPU would not be
>> waken up just to do the write back. This is optimization
>> to lessen power consumption, which is important in
>> embedded devices UBIFS is used for.
>>
>> hrtimers have a nice feature: they are effectively range
>> timers, and we may defind the soft and hard limits for
>> it. Standard timers do not have these feature. They may
>> only be made deferrable, but this means there is effectively
>> no hard limit. So, we will better use hrtimers.
>>
>> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
>> ---
> 
> Seems sane enough from a hrtimer POV, but isn't this already
> functionality that the VFS/pdflush provide?

Yeah, VFS/pdflush takes care of the page-cache and inode cache,
and dirty superblocks. But additionally to this UBIFS has its
own small buffer of (usually) 2KiB size, we call it write-buffer.
This is a very important optimization for NAND flash. And we
have a separate timer to synchronize this small write-buffer.

I was also thinking to hook to VFS, which would mean creating
a fake inode representing our write-bufffer. But this would be
very hacky.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Steven Rostedt <srostedt@redhat.com>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [PATCH 2/2] UBIFS: start using hrtimers
Date: Fri, 29 May 2009 16:58:10 +0300	[thread overview]
Message-ID: <4A1FE9F2.1050904@nokia.com> (raw)
In-Reply-To: <1243603957.23657.217.camel@twins>

Peter Zijlstra wrote:
> On Fri, 2009-05-29 at 18:09 +0300, Artem Bityutskiy wrote:
>> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
>> Subject: [PATCH 2/2] UBIFS: start using hrtimers
>>
>> UBIFS uses timers for write-buffer write-back. It is not
>> crucial for us to write-back exactly on time. We are fine
>> to write-back a little earlier or later. And this means
>> we may optimize UBIFS timer so that it could be groped
>> with a close timer event, so that the CPU would not be
>> waken up just to do the write back. This is optimization
>> to lessen power consumption, which is important in
>> embedded devices UBIFS is used for.
>>
>> hrtimers have a nice feature: they are effectively range
>> timers, and we may defind the soft and hard limits for
>> it. Standard timers do not have these feature. They may
>> only be made deferrable, but this means there is effectively
>> no hard limit. So, we will better use hrtimers.
>>
>> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
>> ---
> 
> Seems sane enough from a hrtimer POV, but isn't this already
> functionality that the VFS/pdflush provide?

Yeah, VFS/pdflush takes care of the page-cache and inode cache,
and dirty superblocks. But additionally to this UBIFS has its
own small buffer of (usually) 2KiB size, we call it write-buffer.
This is a very important optimization for NAND flash. And we
have a separate timer to synchronize this small write-buffer.

I was also thinking to hook to VFS, which would mean creating
a fake inode representing our write-bufffer. But this would be
very hacky.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-05-29 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 15:09 [PATCH 0/2] Use hrtimers in UBIFS Artem Bityutskiy
2009-05-29 15:09 ` [PATCH 1/2] hrtimer: export ktime_add_safe Artem Bityutskiy
2009-06-01 19:56   ` Ingo Molnar
2009-06-02  5:39     ` Artem Bityutskiy
2009-06-02  5:39       ` Artem Bityutskiy
2009-05-29 15:09 ` [PATCH 2/2] UBIFS: start using hrtimers Artem Bityutskiy
2009-05-29 13:32   ` Peter Zijlstra
2009-05-29 13:58     ` Artem Bityutskiy [this message]
2009-05-29 13:58       ` Artem Bityutskiy
2009-05-29 14:00     ` Artem Bityutskiy
2009-05-29 14:00       ` 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=4A1FE9F2.1050904@nokia.com \
    --to=artem.bityutskiy@nokia.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=arjan@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /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.