Linux RAID subsystem development
 help / color / mirror / Atom feed
From: John Robinson <john.robinson@anonymous.org.uk>
To: Linux RAID <linux-raid@vger.kernel.org>
Cc: CoolCold <coolthecold@gmail.com>
Subject: Re: raid(1) and block caching
Date: Sun, 30 Oct 2011 12:36:47 +0000	[thread overview]
Message-ID: <4EAD44DF.6050000@anonymous.org.uk> (raw)
In-Reply-To: <20111029172641.57f92fc3@notabene.brown>

On 29/10/2011 07:26, NeilBrown wrote:
> On Sat, 29 Oct 2011 08:49:09 +0400 CoolCold<coolthecold@gmail.com>  wrote:
[...]
>> As there are some pros and cons on both sides (at least theoretically)
>>   I have dumb question - let's say our array md1 consists on 3 drives -
>> /dev/sd{a,b,c} - and when data read from md1 occurs, which block is
>> cached in VFS (or may be other cache in system, it would be nice to
>> know which part of system is doing caching)  - the block from md1
>> itself or from certain drive? If it is drive-based block cache, it's
>> gonna be potentially memory wasting to keep 3 similar data copies, so
>> I assume md does data reads with something like O_DIRECT flag, but as
>> I 1) don't know C 2) don't know kernel, I'm asking this on the list to
>> make this clean for myself.
>
> The kernel caches pages of files, not pages of devices.
> It doesn't matter where the page of data came from - it is the page of a file
> that is cached.

I suppose if the user was silly enough to mount the same filesystem from 
both md1 and sd{a,b,c} simultaneously then there could be duplication of 
caching, but as I say I think that'd be a silly configuration :-)

Cheers,

John.


  parent reply	other threads:[~2011-10-30 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  4:49 raid(1) and block caching CoolCold
2011-10-29  5:20 ` Stan Hoeppner
2011-10-29  6:26 ` NeilBrown
2011-10-30 11:07   ` CoolCold
2011-10-30 12:36   ` John Robinson [this message]
2011-10-31 18:53     ` CoolCold

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=4EAD44DF.6050000@anonymous.org.uk \
    --to=john.robinson@anonymous.org.uk \
    --cc=coolthecold@gmail.com \
    --cc=linux-raid@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