public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "Carlson, Kristen" <kristen.carlson@intel.com>
Cc: "'linux-mtd@lists.infradead.org'" <linux-mtd@lists.infradead.org>
Subject: Re: caching questions with jffs2
Date: Sat, 08 Dec 2001 09:51:48 +0000	[thread overview]
Message-ID: <19171.1007805108@redhat.com> (raw)
In-Reply-To: <D9223EB959A5D511A98F00508B68C20C1F9639@ORSMSX108>

kristen.carlson@intel.com said:
> Can someone describe to me the algorithm used for freeing memory that
> has been cached due to file activity in jffs2?  Is this done as part
> of the garbage collector?  How long does the cached memory stay
> around?  Is this tunable?

At all times while mounted, JFFS2 keeps a list of the offsets of each 
physical node belonging to each inode.

On read_inode(), it reads each physical node and builds up a full map of 
where data are found for each range of bytes in the file. 

On read(), it just reads data into the page cache. Normal Linux cache 
eviction rules apply to data pages.

On clear_inode(), the extra stuff allocated in read_inode() is freed.

The paper linked from http://sources.redhat.com/jffs2/ may help to shed 
light on this.

--
dwmw2

      reply	other threads:[~2001-12-08  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-08  0:20 caching questions with jffs2 Carlson, Kristen
2001-12-08  9:51 ` David Woodhouse [this message]

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=19171.1007805108@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=kristen.carlson@intel.com \
    --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