All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: 辉少 <wang502742203@qq.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: 回复:ubifs:Questions About Garbage Collection
Date: Sun, 19 Jun 2016 19:05:14 +0200	[thread overview]
Message-ID: <5766D0CA.3090404@nod.at> (raw)
In-Reply-To: <tencent_7ADEA65732A2B069166D1A41@qq.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 2691 bytes --]

Am 19.06.2016 um 18:14 schrieb »ÔÉÙ:
> Thanks for your kind reply£¡Do you mean that in synchronous/asynchronous mode GC is also finished in synchronous
> /asynchronous way as writting is? A more question is£¬are all dirty spaces collected in the same time in synchronous mode(at this point the caller will be blocked for a long time) while in asynchronous mode dirty spaces will be collected little by little in asynchronous mode when i do not  notice£¿Thank you£¡

Hmm, I don't fully understand your first question, can you elaborate?
As for dirty space, GC will not collect all dirty space. UBIFS tells GC how much free space an operation
will take. UBIFS calls this budget. The GC will try to produce as much free space as needed.

Thanks,
//richard

> ---ԭʼÓʼþ---
> *·¢¼þÈË:* "Richard Weinberger"<richard.weinberger@gmail.com>
> *·¢ËÍʱ¼ä:* 2016Äê6ÔÂ19ÈÕ 22:51:43
> *ÊÕ¼þÈË:* "»ÔÉÙ"<wang502742203@qq.com>;
> *³­ËÍ:* "linux-mtd"<linux-mtd@lists.infradead.org>;
> *Ö÷Ìâ:* Re: ubifs:Questions About Garbage Collection
> 
> Hi!
> 
> On Sun, Jun 19, 2016 at 3:56 PM, »ÔÉÙ <wang502742203@qq.com> wrote:
>> Hi£¬MTD  lists
>> I meet some problems while using UBI file system recently.I make an experiment in which I write 2 files(1KB each) to UBI frequently.Normally it takes only several millseconds to
> finish writting 2 files every time£¬but what puzzles me is that it takes about 4 minutes to write once nearly every 20 to 30 minutes.I am wondering how can this problem
> happen£¿Does Garbage Collection lead to this? I mount UBIFS to a 33MiB MTD partion with "o -sync" option.By the way,if UBI is mounted in asynchronous mode, this problem never
> happens. Does GC(Garbage Collecton) differ in synchronous mode andasynchronous mode?  What I've leared from some documents is that GC thread is sleeping while writting files
> without interval until UBIFS is full in synchronous mode and at that point writing will become very slow, but in asynchronous mode, before data is  moved into flash media, GC
> thread will work when there is not enough free space, am I right?
> 
> You observe the issue only in sync mode because every write is done
> immediately and therefore the garbage collector needs to
> produce empty space. This can take some time and as you are in sync
> mode the caller (where you measure the time) will be blocked
> until GC produce some space.
> In asynchronous mode you will hardly notice since writing do the flash
> will be done in a different thread by the write back mechanism.
> 
> -- 
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2016-06-19 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19 13:56 ubifs:Questions About Garbage Collection =?gb18030?B?u9TJ2Q==?=
2016-06-19 14:50 ` Richard Weinberger
     [not found]   ` <tencent_7ADEA65732A2B069166D1A41@qq.com>
2016-06-19 17:05     ` Richard Weinberger [this message]
     [not found]       ` <CAOMqctT4Ftef-TTX+cC9HK5Fg4TTe9MDodGbSrJDBmsKBj_NWA@mail.gmail.com>
2016-06-23 17:34         ` 回复:ubifs:Questions " Richard Weinberger
     [not found]           ` <CAOMqctTpTsTHd8tbVeA+X8bR0KQ77mufw4koDtwZV7rFquQ5xw@mail.gmail.com>
2016-06-23 19:18             ` Richard Weinberger

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=5766D0CA.3090404@nod.at \
    --to=richard@nod.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=wang502742203@qq.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.