All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@permabit.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: fio@vger.kernel.org
Subject: Re: fio --direct=1 and Linux page cache effects
Date: Mon, 10 Dec 2012 20:00:28 -0500	[thread overview]
Message-ID: <6evcc9bdxv.fsf@just-testing.permabit.com> (raw)
In-Reply-To: <50C1B02F.3000902@kernel.dk> (Jens Axboe's message of "Fri, 07 Dec 2012 10:00:31 +0100")

Jens Axboe <axboe@kernel.dk> writes:

> Another idea would be to ensure that we do the bdev cache invalidation
> at a safe point. But that is done at open time right now, which should
> invalidate any cache mappings for the device. If the file close triggers
> blkid and there are no further opens of the device, then those mappings
> would remain.
>
> Would the below work for you?

It looks like it's not enough; the BLKFLSBUF ioctl winds up happening
before blkid runs. I added some instrumentation to the patch and saw
that one thread took the "f->fd != -1" path and then, after
add_file_hash failed, came back to the "from_hash" path. But all of that
seems to finish before blkid gets going, so the pages it pulls in still
won't get invalidated.

Ken


  reply	other threads:[~2012-12-11  1:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05  0:23 fio --direct=1 and Linux page cache effects Ken Raeburn
2012-12-06 21:06 ` Jens Axboe
2012-12-07  9:00   ` Jens Axboe
2012-12-11  1:00     ` Ken Raeburn [this message]
2012-12-11 13:29       ` Jens Axboe
2012-12-11 20:10         ` Ken Raeburn
2012-12-12  7:24           ` Jens Axboe

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=6evcc9bdxv.fsf@just-testing.permabit.com \
    --to=raeburn@permabit.com \
    --cc=axboe@kernel.dk \
    --cc=fio@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 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.