aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.c
Commit message (Expand)AuthorAge
* NFS: Clean up nfs_create_request()Trond Myklebust2010-05-14
* NFS: Avoid a deadlock in nfs_release_pageTrond Myklebust2010-03-11
* NFS: Fix an Oops when truncating a fileTrond Myklebust2010-02-03
* NFS: Throttle page dirtying while we're flushing to diskTrond Myklebust2009-03-11
* Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git...Linus Torvalds2008-01-31
|\
| * NFS: Switch from intr mount option to TASK_KILLABLEMatthew Wilcox2007-12-06
* | NFS: Clean up the write request locking.Trond Myklebust2008-01-30
|/
* mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-19
* NFS: Replace NFS_I(inode)->req_lock with inode->i_lockTrond Myklebust2007-07-10
* NFS: reduce latency by using conditional rescheduling in nfs_scan_listTrond Myklebust2007-07-10
* NFS: Prevent integer overflow in nfs_scan_list()Trond Myklebust2007-07-10
* NFS cleanup: speed up nfs_scan_commit using radix tree tagsTrond Myklebust2007-07-10
* NFS cleanup: Rename NFS_PAGE_TAG_WRITEBACK to NFS_PAGE_TAG_LOCKEDTrond Myklebust2007-07-10
* NFS: Convert struct nfs_page to use krefsTrond Myklebust2007-07-10
* NFS: Replace vfsmount and dentry in nfs_open_context with struct pathTrond Myklebust2007-07-10
* NFS: Avoid a deadlock situation on writeTrond Myklebust2007-05-24
* Detach sched.h from mm.hAlexey Dobriyan2007-05-21
* NFS: Kill the obsolete NFS_PARANOIAJesper Juhl2007-05-09
* NFS: Fix a compile glitch on 64-bit systemsTrond Myklebust2007-05-04
* NFS: Clean up nfs_create_request commentsJason Uhlenkott2007-05-02
* NFS: Use pgoff_t in structures and functions that pass page cache offsetsTrond Myklebust2007-05-01
* NFS: Fix a buffer overflow in the allocation of struct nfs_read/writedataTrond Myklebust2007-05-01
* NFS: Fix a race when doing NFS write coalescingTrond Myklebust2007-05-01
* NFS: Cleanup for nfs_readpages()Trond Myklebust2007-05-01
* NFS: Another cleanup of the read/write request coalescing codeTrond Myklebust2007-05-01
* NFS: Cleanup the coalescing codeTrond Myklebust2007-05-01
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linusTrond Myklebust2006-12-07
|\
| * [PATCH] slab: remove kmem_cache_tChristoph Lameter2006-12-07
| * [PATCH] slab: remove SLAB_KERNELChristoph Lameter2006-12-07
* | NFS: Fix up writeback_control->nr_to_write accountingTrond Myklebust2006-12-06
* | NFS: Fix up the dirty page accountingTrond Myklebust2006-12-06
* | NFS: Clean up nfs_scan_dirty()Trond Myklebust2006-12-06
|/
* [PATCH] Really ignore kmem_cache_destroy return valueAlexey Dobriyan2006-09-27
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-06-30
|\
| * Remove obsolete #include <linux/config.h>Jörn Engel2006-06-30
* | [PATCH] zoned vm counters: conversion of nr_dirty to per zone counterChristoph Lameter2006-06-30
|/
* [PATCH] fix static linking of NFSDavid Brownell2006-06-27
* NFS: Split fs/nfs/inode.cDavid Howells2006-06-09
* NFS: Flesh out nfs_invalidate_page()Trond Myklebust2006-06-09
* NFS: Fix a race with PG_private and nfs_release_page()Trond Myklebust2006-03-20
* NFS: Avoid races between writebacks and truncationTrond Myklebust2006-03-20
* [PATCH] NFS: Replace nfs_page insertion sort with a radix sortTrond Myklebust2005-06-22
* [PATCH] NFS: Make searching and waiting on busy writeback requests more effic...Trond Myklebust2005-06-22
* [PATCH] NFS: cleanup: shrink struct nfs_open_contextTrond Myklebust2005-06-22
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-16
sem->count), "i" (RWSEM_ACTIVE_READ_BIAS) : "cc", "memory" ); if (old < 0) rwsem_down_read_failed(sem); } /* * trylock for reading -- returns 1 if successful, 0 if contention */ static inline int __down_read_trylock(struct rw_semaphore *sem) { signed long old, new; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: ltr %1,%0\n" " jm 1f\n" " ahi %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b\n" "1:" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: ltgr %1,%0\n" " jm 1f\n" " aghi %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b\n" "1:" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "i" (RWSEM_ACTIVE_READ_BIAS) : "cc", "memory" ); return old >= 0 ? 1 : 0; } /* * lock for writing */ static inline void __down_write(struct rw_semaphore *sem) { signed long old, new, tmp; tmp = RWSEM_ACTIVE_WRITE_BIAS; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " a %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " ag %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "m" (tmp) : "cc", "memory" ); if (old != 0) rwsem_down_write_failed(sem); } /* * trylock for writing -- returns 1 if successful, 0 if contention */ static inline int __down_write_trylock(struct rw_semaphore *sem) { signed long old; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%2)\n" "0: ltr %0,%0\n" " jnz 1f\n" " cs %0,%4,0(%2)\n" " jl 0b\n" #else /* __s390x__ */ " lg %0,0(%2)\n" "0: ltgr %0,%0\n" " jnz 1f\n" " csg %0,%4,0(%2)\n" " jl 0b\n" #endif /* __s390x__ */ "1:" : "=&d" (old), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "d" (RWSEM_ACTIVE_WRITE_BIAS) : "cc", "memory" ); return (old == RWSEM_UNLOCKED_VALUE) ? 1 : 0; } /* * unlock after reading */ static inline void __up_read(struct rw_semaphore *sem) { signed long old, new; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " ahi %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " aghi %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "i" (-RWSEM_ACTIVE_READ_BIAS) : "cc", "memory" ); if (new < 0) if ((new & RWSEM_ACTIVE_MASK) == 0) rwsem_wake(sem); } /* * unlock after writing */ static inline void __up_write(struct rw_semaphore *sem) { signed long old, new, tmp; tmp = -RWSEM_ACTIVE_WRITE_BIAS; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " a %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " ag %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "m" (tmp) : "cc", "memory" ); if (new < 0) if ((new & RWSEM_ACTIVE_MASK) == 0) rwsem_wake(sem); } /* * downgrade write lock to read lock */ static inline void __downgrade_write(struct rw_semaphore *sem) { signed long old, new, tmp; tmp = -RWSEM_WAITING_BIAS; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " a %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " ag %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "m" (tmp) : "cc", "memory" ); if (new > 1) rwsem_downgrade_wake(sem); } /* * implement atomic add functionality */ static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem) { signed long old, new; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " ar %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " agr %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "d" (delta) : "cc", "memory" ); } /* * implement exchange and add functionality */ static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem) { signed long old, new; __asm__ __volatile__( #ifndef __s390x__ " l %0,0(%3)\n" "0: lr %1,%0\n" " ar %1,%5\n" " cs %0,%1,0(%3)\n" " jl 0b" #else /* __s390x__ */ " lg %0,0(%3)\n" "0: lgr %1,%0\n" " agr %1,%5\n" " csg %0,%1,0(%3)\n" " jl 0b" #endif /* __s390x__ */ : "=&d" (old), "=&d" (new), "=m" (sem->count) : "a" (&sem->count), "m" (sem->count), "d" (delta) : "cc", "memory" ); return new; } #endif /* __KERNEL__ */ #endif /* _S390_RWSEM_H */