public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: Ferenc Havasi <havasi@inf.u-szeged.hu>
Cc: linux-mtd@lists.infradead.org
Subject: Re: A JFFS2 optimization related to syslog
Date: Tue, 18 Apr 2006 15:46:22 +0400	[thread overview]
Message-ID: <4444D18E.80104@yandex.ru> (raw)
In-Reply-To: <4444C8FD.1070406@inf.u-szeged.hu>

Hello Ferenc,

Ferenc Havasi wrote:
> Dear All,
> 
> If JFFS2 is used as root filesystem, syslogd/klogd can cause problems,
> because every log line are written out individually, so the log file
> will contain a lot of small nodes. Because a log file can be very large
> (over 30M in our case) it can cause large memory consuption and can make
> the system very slow, especially at opening it after next reboot
> (becauseof the large frag-tree). Unforunatelly garbage collecting also
> does not help, because none of the nodes is obsocalated.
Hmm,

for this testcase you actually want to write entire page if this is the 
last page of this file. But your patch writes entire page if the current 
fragment ends at the end of page, which is different.

I mean, you probably want to do something like this instead:

if ((inode->i_size >> PAGE_CACHE_SHIFT) >= pg->index) {
     /*
      * This is the last page, so unconditionally re-write it fully.
      */
     start = 0;
}

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

  parent reply	other threads:[~2006-04-18 11:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18 11:09 A JFFS2 optimization related to syslog Ferenc Havasi
2006-04-18 11:32 ` Jörn Engel
2006-04-19 11:00   ` David Woodhouse
2006-04-19 12:45     ` David Woodhouse
2006-04-19 12:55       ` Jörn Engel
2006-05-14  3:22         ` David Woodhouse
2006-04-18 11:46 ` Artem B. Bityutskiy [this message]
2006-04-18 11:51   ` Artem B. Bityutskiy
2006-04-18 12:05   ` Jörn Engel

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=4444D18E.80104@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=havasi@inf.u-szeged.hu \
    --cc=linux-mtd@lists.infradead.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