xfs
[Top] [All Lists]

TAKE - revamp pagebuf locking

To: linux-xfs@xxxxxxxxxxx
Subject: TAKE - revamp pagebuf locking
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 28 Mar 2002 13:47:47 -0600
Sender: owner-linux-xfs@xxxxxxxxxxx
Pagebuf used to use an avl tree to organize cached buffers,
one avl tree per filesystem, and a spinlock across the whole
tree. There was also too much other use of spinlocks and
complex interactions between them.

This changes us to use a hash table for lookup of buffers,
with one spinlock per hash chain. The spinlock within each
pagebuf is now gone and code to lookup and free pagebufs
is simplified. 

Handling of the list of delayed write pagebufs is cleaned
up, and extensive use made of list macros.

Finally in the I/O path, remove the case where we had pages
without buffer heads (mmap write). This was causing excessive
memory pressure on the flush path.

This should also help out on the forced shutdown path although
we are seeing cases where unmount fails after forced shutdown
and a leak of an internal data structure.

This code has had extensive testing, but it is a fairly radical
change. Please let me know if things happen after you start
using it.

Steve

Date:  Thu Mar 28 11:45:15 PST 2002
Workarea:  jen.americas.sgi.com:/src/lord/xfs-newpagebuf

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:115116a
linux/fs/xfs/pagebuf/page_buf_internal.h - 1.1
        - pagebuf internal definitions moved here from page_buf.h

linux/fs/xfs/xfsidbg.c - 1.178
        - account for changes in pagebuf structure

linux/fs/xfs/xfs_buf.h - 1.85
        - couple of tweaks for reworked pagebuf.

linux/fs/xfs/xfs_buf_item.c - 1.116
        - a forced shutdown cleanup

linux/fs/xfs/xfs_log_recover.c - 1.221
        - correct locking on iclog buffers

linux/fs/xfs/linux/xfs_linux.h - 1.63
        - remove avl.h include, file deleted

linux/fs/xfs/pagebuf/page_buf_io.c - 1.20
        - always put buffer heads on pages, really only affects reading holes
          and page faults. Reduces memory pressure when flushing mmapped data.

linux/fs/xfs/pagebuf/Makefile - 1.5
        - remove avl.c, file deleted

linux/fs/xfs/pagebuf/avl.c - 1.3
        - file deleted

linux/fs/xfs/pagebuf/page_buf_locking.c - 1.7
        - rewrite pagebuf locking. The avl tree is gone and is replaced by hash
          buckets. Code is simpler, smaller and faster.

linux/fs/xfs/pagebuf/page_buf.c - 1.15
        - simplify locking of pagebufs

linux/fs/xfs/pagebuf/page_buf.h - 1.10
        - move pagebuf internal definitions to a new file

linux/fs/xfs/pagebuf/avl.h - 1.2
        - file deleted



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - revamp pagebuf locking, Steve Lord <=