aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2005-09-05[PATCH] /proc/<pid>/numa_maps to show on which nodes pages resideChristoph Lameter
This patch was recently discussed on linux-mm: http://marc.theaimsgroup.com/?t=112085728500002&r=1&w=2 I inherited a large code base from Ray for page migration. There was a small patch in there that I find to be very useful since it allows the display of the locality of the pages in use by a process. I reworked that patch and came up with a /proc/<pid>/numa_maps that gives more information about the vma's of a process. numa_maps is indexes by the start address found in /proc/<pid>/maps. F.e. with this patch you can see the page use of the "getty" process: margin:/proc/12008 # cat maps 00000000-00004000 r--p 00000000 00:00 0 2000000000000000-200000000002c000 r-xp 00000000 08:04 516 /lib/ld-2.3.3.so 2000000000038000-2000000000040000 rw-p 00028000 08:04 516 /lib/ld-2.3.3.so 2000000000040000-2000000000044000 rw-p 2000000000040000 00:00 0 2000000000058000-2000000000260000 r-xp 00000000 08:04 54707842 /lib/tls/libc.so.6.1 2000000000260000-2000000000268000 ---p 00208000 08:04 54707842 /lib/tls/libc.so.6.1 2000000000268000-2000000000274000 rw-p 00200000 08:04 54707842 /lib/tls/libc.so.6.1 2000000000274000-2000000000280000 rw-p 2000000000274000 00:00 0 2000000000280000-20000000002b4000 r--p 00000000 08:04 9126923 /usr/lib/locale/en_US.utf8/LC_CTYPE 2000000000300000-2000000000308000 r--s 00000000 08:04 60071467 /usr/lib/gconv/gconv-modules.cache 2000000000318000-2000000000328000 rw-p 2000000000318000 00:00 0 4000000000000000-4000000000008000 r-xp 00000000 08:04 29576399 /sbin/mingetty 6000000000004000-6000000000008000 rw-p 00004000 08:04 29576399 /sbin/mingetty 6000000000008000-600000000002c000 rw-p 6000000000008000 00:00 0 [heap] 60000fff7fffc000-60000fff80000000 rw-p 60000fff7fffc000 00:00 0 60000ffffff44000-60000ffffff98000 rw-p 60000ffffff44000 00:00 0 [stack] a000000000000000-a000000000020000 ---p 00000000 00:00 0 [vdso] cat numa_maps 2000000000000000 default MaxRef=43 Pages=11 Mapped=11 N0=4 N1=3 N2=2 N3=2 2000000000038000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2 2000000000040000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1 2000000000058000 default MaxRef=43 Pages=61 Mapped=61 N0=14 N1=15 N2=16 N3=16 2000000000268000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2 2000000000274000 default MaxRef=1 Pages=3 Mapped=3 Anon=3 N0=3 2000000000280000 default MaxRef=8 Pages=3 Mapped=3 N0=3 2000000000300000 default MaxRef=8 Pages=2 Mapped=2 N0=2 2000000000318000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N2=1 4000000000000000 default MaxRef=6 Pages=2 Mapped=2 N1=2 6000000000004000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1 6000000000008000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1 60000fff7fffc000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1 60000ffffff44000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1 getty uses ld.so. The first vma is the code segment which is used by 43 other processes and the pages are evenly distributed over the 4 nodes. The second vma is the process specific data portion for ld.so. This is only one page. The display format is: <startaddress> Links to information in /proc/<pid>/map <memory policy> This can be "default" "interleave={}", "prefer=<node>" or "bind={<zones>}" MaxRef= <maximum reference to a page in this vma> Pages= <Nr of pages in use> Mapped= <Nr of pages with mapcount > Anon= <nr of anonymous pages> Nx= <Nr of pages on Node x> The content of the proc-file is self-evident. If this would be tied into the sparsemem system then the contents of this file would not be too useful. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05[XFS] Sort out some cosmetic differences between XFS trees.Nathan Scott
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:23719a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Fix incorrect use of BMAPI_READ in unwritten extent handlingNathan Scott
(luckily just cosmetic). SGI-PV: 942232 SGI-Modid: xfs-linux-melb:xfs-kern:23718a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] replace "extern inline" with "static inline" Patch from Adrian BunkChristoph Hellwig
<bunk@stusta.de>, thanks a lot! SGI-PV: 942227 SGI-Modid: xfs-linux:xfs-kern:198642a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Switch kernel thread handling to the kthread_ APIChristoph Hellwig
SGI-PV: 942063 SGI-Modid: xfs-linux:xfs-kern:198388a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Fix racy access to pb_flags. pagebuf_rele() modified pb_flags afterDavid Chinner
the pagebuf had been unlocked if the buffer was delwri. At high load, this could result in a race when the superblock was being synced that would result the flags being incorrect and the iodone functions being executed incorrectly. This then leads to iclog callback failures or AIL list corruptions resulting in filesystem shutdowns. SGI-PV: 923981 SGI-Modid: xfs-linux:xfs-kern:23616a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Retry linux inode cacech lookup if we found a stale inode. ThisChristoph Hellwig
fixes crashes under high nfs load SGI-PV: 941429 SGI-Modid: xfs-linux:xfs-kern:197929a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Fixes a bug in the quota code when allocating a new dquot recordTim Shimmin
which can cause an extent hole to be filled and a free extent to be processed. In this case, we make a few mistakes: forget to pass back the transaction, forget to put a hold on the buffer and forget to add the buf to the new transaction. SGI-PV: 940366 SGI-Modid: xfs-linux:xfs-kern:23594a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] remove some dead code from pagebufChristoph Hellwig
SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:197783a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] allow a null behaviour pointer in linvfs_clear_inodeChristoph Hellwig
SGI-PV: 940531 SGI-Modid: xfs-linux:xfs-kern:197782a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Manage spinlock differences between kernel versions a bit.Nathan Scott
SGI-PV: 904196 SGI-Modid: xfs-linux:xfs-kern:23563a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] add handlers to fix xfs_flock_t alignment issues in compat ioctlsEric Sandeen
SGI-PV: 938899 SGI-Modid: xfs-linux:xfs-kern:197403a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Check if there is first behavior before calling VOP_RECLAIM fromFelix Blyakher
linvfs_clear_inode(). The behavior may go away in VOP_INACTIVE. SGI-PV: 941000 SGI-Modid: xfs-linux:xfs-kern:197355a Signed-off-by: Felix Blyakher <felixb@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Need to be able to reset sb_qflags if not mounting with quotasTim Shimmin
having previously mounted with quotas. SGI-PV: 940491 SGI-Modid: xfs-linux:xfs-kern:23388a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] streamline the clear_inode pathChristoph Hellwig
SGI-PV: 940531 SGI-Modid: xfs-linux:xfs-kern:196888a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Delay I/O completion for unwritten extents after conversionChristoph Hellwig
SGI-PV: 936584 SGI-Modid: xfs-linux:xfs-kern:196886a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Delay direct I/O completion to a workqueue This is nessecaryChristoph Hellwig
because aio+dio completions may happen from irq context but we need process context for converting unwritten extents. We also queue regular direct I/O completions to workqueue for regularity, there's only one queue_work call per syscall. SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:196857a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05[XFS] Add in the new xfs_aops.h header file for I/O completion struct.Christoph Hellwig
SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:196857a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[PATCH] uclinux: use MAP_PRIVATE when mmaping code regions in flat binary loaderGreg Ungerer
Use MAP_PRIVATE when calling mmap to get memory for the code region. The flat loader was using MAP_SHARED, but underlying changes to the MMUless mmap means this is now wrong. Signed-off-by: Greg Ungerer <gerg@uclinux.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-02[XFS] Add infrastructure for tracking I/O completionsChristoph Hellwig
SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:196856a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] add infrastructure for waiting on I/O completion at inode reclaimChristoph Hellwig
time SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:196854a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] remove unessecary vnode flagsChristoph Hellwig
SGI-PV: 934766 SGI-Modid: xfs-linux:xfs-kern:196852a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Fix sparse warnings in kmem_* functions Patch from Victor FuscoChristoph Hellwig
<victor@cetuc.puc-rio.br> SGI-PV: 940376 SGI-Modid: xfs-linux:xfs-kern:196705a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Need to unlock the AIL before calling xfs_force_shutdown() becauseTim Shimmin
when it goes to force out the log, and get the tail lsn, it will want to get the AIL lock. SGI-PV: 940076 SGI-Modid: xfs-linux:xfs-kern:23260a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] remove struct vnode::v_typeChristoph Hellwig
SGI-PV: 936236 SGI-Modid: xfs-linux:xfs-kern:195878a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Remove extraneous quotacheck diagnostics.Nathan Scott
SGI-PV: 907752 SGI-Modid: xfs-linux:xfs-kern:23163a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Add in grpid/nogrpid mount option parsing, actual code was alwaysNathan Scott
there.. SGI-PV: 939444 SGI-Modid: xfs-linux:xfs-kern:23162a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] 929956 add log debugging and tracing infoTim Shimmin
SGI-PV: 931456 SGI-Modid: xfs-linux:xfs-kern:23155a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Fix up the calculation of the reservation overhead to hopefullyTim Shimmin
include all the components which make up the transaction in the ondisk log. Having this incomplete has shown up as problems on IRIX when some v2 log changes went in. The symptom was the msg of "xfs_log_write: reservation ran out. Need to up reservation" and was seen on synchronous writes on files with lots of holes (and therefore lots of extents). SGI-PV: 931457 SGI-Modid: xfs-linux:xfs-kern:23095a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Fix regression in transaction reserved-block accounting for directNathan Scott
writes. SGI-PV: 938145 SGI-Modid: xfs-linux:xfs-kern:23088a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Fix check for writeable file in xfs_ioc_space ioctl codeEric Sandeen
SGI-PV: 938905 SGI-Modid: xfs-linux:xfs-kern:195240a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Prevent the incore superblock sb_fdblocks count from leaking when weDavid Chinner
are getting ENOSPC errors on writes. When we fail to allocate space for indirect blocks in xfs_bmapi() make sure we release the direct block allocation before returning. SGI-PV: 938502 SGI-Modid: xfs-linux:xfs-kern:22986a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Add a chunk of tracing code to diagnose truncate related issues.Nathan Scott
SGI-PV: 938410 SGI-Modid: xfs-linux:xfs-kern:22966a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Make metadata IO completion consistent with other IO completionNathan Scott
handlers. SGI-PV: 938409 SGI-Modid: xfs-linux:xfs-kern:22965a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] replace vn_get usage by iholdChristoph Hellwig
SGI-PV: 938306 SGI-Modid: xfs-linux:xfs-kern:194627a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] send dmapi events from nopage for mmapped filesDean Roehrich
SGI-PV: 935317 SGI-Modid: xfs-linux:xfs-kern:192007a Signed-off-by: Dean Roehrich <roehrich@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] upate copyrightsDean Roehrich
SGI-PV: 933765 SGI-Modid: xfs-linux:xfs-kern:190760a Signed-off-by: Dean Roehrich <roehrich@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02[XFS] Update copyrightsDean Roehrich
SGI-PV: 933551 SGI-Modid: xfs-linux:xfs-kern:190625a Signed-off-by: Dean Roehrich <roehrich@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-01[CRYPTO]: crypto_free_tfm() callers no longer need to check for NULLJesper Juhl
Since the patch to add a NULL short-circuit to crypto_free_tfm() went in, there's no longer any need for callers of that function to check for NULL. This patch removes the redundant NULL checks and also a few similar checks for NULL before calls to kfree() that I ran into while doing the crypto_free_tfm bits. I've succesfuly compile tested this patch, and a kernel with the patch applied boots and runs just fine. When I posted the patch to LKML (and other lists/people on Cc) it drew the following comments : J. Bruce Fields commented "I've no problem with the auth_gss or nfsv4 bits.--b." Sridhar Samudrala said "sctp change looks fine." Herbert Xu signed off on the patch. So, I guess this is ready to be dropped into -mm and eventually mainline. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01[CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriateHerbert Xu
This patch goes through the current users of the crypto layer and sets CRYPTO_TFM_REQ_MAY_SLEEP at crypto_alloc_tfm() where all crypto operations are performed in process context. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-30Merge refs/heads/for-linus from ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git
2005-08-29[TCP]: Move the tcp sock states to net/tcp_states.hArnaldo Carvalho de Melo
Lots of places just needs the states, not even linux/tcp.h, where this enum was, needs it. This speeds up development of the refactorings as less sources are rebuilt when things get moved from net/tcp.h. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-arm.git Linus Torvalds
2005-08-28fix mismerge in ll_rw_blk.cJames Bottomley
2005-08-26[PATCH] Fix oops in sysfs_hash_and_remove_file()James Bottomley
The problem arises if an entity in sysfs is created and removed without ever having been made completely visible. In SCSI this is triggered by removing a device while it's initialising. The problem appears to be that because it was never made visible in sysfs, the sysfs dentry has a null d_inode which oopses when a reference is made to it. The solution is simply to check d_inode and assume the object was never made visible (and thus doesn't need deleting) if it's NULL. (akpm: possibly a stopgap for 2.6.13 scsi problems. May not be the long-term fix) Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-26[PATCH] Fix oops in fs/locks.c on close of file with pending locksSteve French
The recent change to locks_remove_flock code in fs/locks.c changes how byte range locks are removed from closing files, which shows up a bug in cifs. The assumption in the cifs code was that the close call sent to the server would remove any pending locks on the server on this file, but that is no longer safe as the fs/locks.c code on the client wants unlock of 0 to PATH_MAX to remove all locks (at least from this client, it is not possible AFAIK to remove all locks from other clients made to the server copy of the file). Note that cifs locks are different from posix locks - and it is not possible to map posix locks perfectly on the wire yet, due to restrictions of the cifs network protocol, even to Samba without adding a new request type to the network protocol (which we plan to do for Samba 3.0.21 within a few months), but the local client will have the correct, posix view, of the lock in most cases. The correct fix for cifs for this would involve a bigger change than I would like to do this late in the 2.6.13-rc cycle - and would involve cifs keeping track of all unmerged (uncoalesced) byte range locks for each remote inode and scanning that list to remove locks that intersect or fall wholly within the range - locks that intersect may have to be reaquired with the smaller, remaining range. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-26[PATCH] hppfs: fix symlink error pathPaolo 'Blaisorblade' Giarrusso
While touching this code I noticed the error handling is bogus, so I fixed it up. I've removed the IS_ERR(proc_dentry) check, which will never trigger and is clearly a typo: we must check proc_file instead. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-26[PATCH] Fixup symlink function pointers for hppfs [for 2.6.13]Paolo 'Blaisorblade' Giarrusso
Update hppfs for the symlink functions prototype change. Yes, I know the code I leave there is still _bogus_, see next patch for this. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-26[PATCH] Document idr_get_new_above() semantics, update inotifyJohn McCutchan
There is an off by one problem with idr_get_new_above. The comment and function name suggest that it will return an id > starting_id, but it actually returned an id >= starting_id, and kernel callers other than inotify treated it as such. The patch below fixes the comment, and fixes inotifys usage. The function name still doesn't match the behaviour, but it never did. Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-20Don't allow normal users to set idle IO priorityLinus Torvalds
It has all the normal priority inversion problems. Signed-off-by: Linus Torvalds <torvalds@osdl.org>