public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Folkert van Heusden <folkert@vanheusden.com>
To: linux-kernel@vger.kernel.org
Subject: disabling cache to be able to create a http://en.wikipedia.org/wiki/Peer_to_Peer_Remote_Copy solution
Date: Sun, 25 Apr 2010 21:16:43 +0200	[thread overview]
Message-ID: <20100425191643.GP4011@vanheusden.com> (raw)

Hi,

I'm trying to achive the following

   storage a                   storage b
      |   |                     | |
      |   +--+                  | |
      | +----|------------------+ |    <- fibre
      | |    |                    |
      | |    +------------------+ |
      | |                       | |
    linux a                    linux b
      |                           |
      +-------------+  +----------+    <- iscsi
                    |  |
                   vmware

A trained eye will recognize this as a 'peer to peer remote
copy'-implementation.

So linux a (or b) receive storage requests from vmware and store those
mirrored on storage a and b: both have an md1 on their paths to storage
a and b.

Now let's say vmware talks active/passive to those linux boxes. At some
moment the left path is selected and vmware sends a block to linux a to
store on disk. Linux a stores this block on both storage systems and
_caches this block in memory_.
Then at some time, vmware switches to the path via system b and also
stores at the same block some data.
Then, vmware switches back to path a and reads again this block from
disk. Now here's where the problem comes up: linux a thinks it still has
this block in the memory-cache and serves it from there while in fact,
when the path went through system b, this block was already changed on
the storage!
So to be able to construct this mechanism, I somehow need to be able to
disable the read-cache of linux a and b. I found that you can clear the
cache by entering "echo 3 > /proc/sys/vm/drop_caches" but this can't be
automatically invoked by the vmware system when it switches paths.

Anyone got a suggestion?


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

                 reply	other threads:[~2010-04-25 19:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100425191643.GP4011@vanheusden.com \
    --to=folkert@vanheusden.com \
    --cc=linux-kernel@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