public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Purging the Page Table (was: Purging the Buffer Cache)
@ 2000-12-22  1:16 Al Peat
  2000-12-28  5:50 ` Jamie Lokier
  0 siblings, 1 reply; 2+ messages in thread
From: Al Peat @ 2000-12-22  1:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: myself, Juri Haberland

--- Juri Haberland <juri.haberland@innominate.com>
wrote:
> Al Peat wrote:
> > 
> >   Is there any way to completely purge the buffer
> > cache -- not just the write requests (ala 'sync'
> or
> > 'update'), but the whole thing?  Can I just call
> > invalidate_buffers() or destroy_buffers()?
>
> What about the ioctl BLKFLSBUF ?
> If you are running a SuSE distrib there is already a
> tool called flushb
> that does what you want. If not, you can download
> the simple tool from
> http://innominate.org/~juri/flushb.tar.gz

  Another question: what if I need to purge the page
table of all files as well?  Is there a clean way to
do that?  I've been looking at /mm/memory.c, but it
doesn't look like clear_page_tables, etc. get
exported.

  I need /all/ read requests to go to disk, and it'd
be nice if I could do that without a reboot (but I'll
take the reboot if that's the only way to go about it
:)

  Thanks again,
  	Al

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Purging the Page Table (was: Purging the Buffer Cache)
  2000-12-22  1:16 Purging the Page Table (was: Purging the Buffer Cache) Al Peat
@ 2000-12-28  5:50 ` Jamie Lokier
  0 siblings, 0 replies; 2+ messages in thread
From: Jamie Lokier @ 2000-12-28  5:50 UTC (permalink / raw)
  To: Al Peat; +Cc: linux-kernel, myself, Juri Haberland

Al Peat wrote:
> > >   Is there any way to completely purge the buffer
> > > cache -- not just the write requests (ala 'sync'
> > or
> > > 'update'), but the whole thing?  Can I just call
> > > invalidate_buffers() or destroy_buffers()?

Try this script:

case "`id -u`" in
  0) ;;
  *) echo Only root can run this script. 1>&2; exit 1 ;;
esac

mount | sort -k3 -r | \
while read dev ON dir TYPE type etc; do
  echo mount $dir -o remount
  mount $dir -o remount
done

mount | sort -k1 | \
while read dev ON dir TYPE type etc; do
  case "$dev" in
    /dev/*) echo hdparm -f $dev
      hdparm -f $dev >/dev/null ;;
  esac
done

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-12-28  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-22  1:16 Purging the Page Table (was: Purging the Buffer Cache) Al Peat
2000-12-28  5:50 ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox