All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Invalidating buffer cache in dom0
@ 2005-05-28 18:49 Ian Pratt
  2005-05-28 20:07 ` Keir Fraser
  2005-05-29  9:04 ` Jacob Gorm Hansen
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Pratt @ 2005-05-28 18:49 UTC (permalink / raw)
  To: Jacob Gorm Hansen, xen-devel


> Does anyone know of an ioctl or similar that I could use to 
> make Linux forget about (not flush) buffer cache contents, or 
> how to disable it?
> 
> I have tried reading from the block dev with O_DIRECT but 
> that does not help.

Have you tried using raw devices? See "man raw". I've never used them,
but I'd be interested to know whether this works. There's an argument
that we should be using them by default, particularly for people using
using cluster filesystems -- caching stuff in dom0 could be very bad.

Perhaps some of the ocfs2 guys that hang out on the list could comment?

Thanks,
Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Invalidating buffer cache in dom0
@ 2005-05-27  6:35 Jacob Gorm Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Gorm Hansen @ 2005-05-27  6:35 UTC (permalink / raw)
  To: xen-devel

hi,

I have a domU that dumps some data (a checkpoint) to a virtual device. 
Afterwards, I want to create a new domU based on that data, but because 
right now my domain bootstrapper does not have a disk driver, I first 
build a ramdisk which I give as an argument to my bootstrapper.

This all works fine, but I have the problem that I have to reboot dom0 
between each run, because apparently dom0 Linux does not notice that the 
contents on disk have changed, and keep giving me stale data from its 
buffer cache when I create the ramdisk. I have tested that this is 
actually what happens by grepping for a string in the block device 
(/dev/hda5), and the value of the string changes between reboots.

Does anyone know of an ioctl or similar that I could use to make Linux 
forget about (not flush) buffer cache contents, or how to disable it?

I have tried reading from the block dev with O_DIRECT but that does not 
help.

Thanks,
Jacob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-29  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-28 18:49 Invalidating buffer cache in dom0 Ian Pratt
2005-05-28 20:07 ` Keir Fraser
2005-05-29  9:04 ` Jacob Gorm Hansen
  -- strict thread matches above, loose matches on Subject: below --
2005-05-27  6:35 Jacob Gorm Hansen

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.