Re: [PATCH 28/30] r/o bind mounts: track numbers of writers to mounts

2008-02-20 Thread Dave Hansen
On Mon, 2008-02-18 at 17:10 +0100, Miklos Szeredi wrote: + /* + * We don't have to hold all of the locks at the + * same time here because we know that we're the + * last reference to mnt and that no new writers + * can come in. + */ +

Re: [PATCH 07/30] r/o bind mounts: stub functions

2008-02-20 Thread Dave Hansen
On Sat, 2008-02-16 at 07:31 +0100, Christoph Hellwig wrote: once we put pieces in the first three patches would be useful aswell, to easily catch additions in the next cycle that might be adding NULL-vfsmount calls to dentry_open. So, we want [PATCH 07/30] r/o bind mounts: stub

Re: 2.6.25-rc2-mm1 - several bugs and a crash

2008-02-21 Thread Dave Hansen
On Thu, 2008-02-21 at 04:38 -0800, Andrew Morton wrote: 4[0.071378] [do_name+279/440] do_name+0x117/0x1b8 4[0.071570] [write_buffer+34/49] write_buffer+0x22/0x31 4[0.071763] [flush_window+105/184] flush_window+0x69/0xb8 4[0.071996] [unpack_to_rootfs+1585/2238]

Re: [RFC][PATCH] make /proc/pid/pagemap work with huge pages and return page size

2008-02-23 Thread Dave Hansen
On Sat, 2008-02-23 at 10:18 +0800, Matt Mackall wrote: Another problem is that there is no way to get information about the page size a specific mapping uses. Is this true generically, or just with pagemap? It seems like we should have a way to tell that a particular mapping is of large

Re: [RFC] [PATCH] To refuse users from probing preempt_schedule()

2008-02-24 Thread Dave Hansen
On Mon, 2008-02-25 at 11:27 +0530, srinivasa wrote: This patch prohibits user from probing preempt_schedule(). One way of prohibiting the user from probing functions is by marking such functions with __kprobes. But this method doesn't work for those functions, which are already marked to

Re: Page scan keeps touching kernel text pages

2008-02-25 Thread Dave Hansen
On Mon, 2008-02-25 at 15:07 +, Andy Whitcroft wrote: shrink_page_list() would be expected to be passed pages pulled from the active or inactive lists via isolate_lru_pages()? I would not have expected to find the kernel text on the LRU and therefore not expect to see it passed to

Re: [RFC][PATCH] make /proc/pid/pagemap work with huge pages and return page size

2008-02-25 Thread Dave Hansen
On Mon, 2008-02-25 at 13:09 +0100, Hans Rosenfeld wrote: On Sat, Feb 23, 2008 at 10:31:01AM -0800, Dave Hansen wrote: - 4 bits for the page size, with 0 meaning native page size (4k on x86, 8k on alpha, ...) and values 1-15 being specific to the architecture (I used 1 for 2M, 2

Re: [PATCH V2] Suspend,cpuidle:resume_hang fix with cpuidle

2012-07-06 Thread Dave Hansen
On 07/06/2012 10:23 AM, Rafael J. Wysocki wrote: OK, this looks good to me. Queuing up in the linux-next branch of the linux-pm.git tree. If no problems with it are reported, I'll move it to the pm-cpuidle branch in a couple of days. I've got this running on the problem hardware. It seems

[PATCH 03/22] record when sb_writer_count elevated for inode

2007-02-09 Thread Dave Hansen
this is the first non-trivial use of the inc/drop_nlink() functions, add some kernel docs for them. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/inode.c |7 + lxc-dave/fs/libfs.c |1 lxc-dave/include/linux/fs.h | 58 3

[PATCH 01/22] filesystem helpers for custom 'struct file's

2007-02-09 Thread Dave Hansen
Some filesystems forego the vfs and may_open() and create their own 'struct file's. This patch creates a couple of helper functions which can be used by these filesystems, and will provide a unified place which the r/o bind mount code may patch. Signed-off-by: Dave Hansen [EMAIL PROTECTED

[PATCH 21/22] honor r/w changes at do_remount() time

2007-02-09 Thread Dave Hansen
' operation. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namespace.c | 24 ++-- lxc-dave/fs/open.c |2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff -puN fs/namespace.c~23-24-honor-r-w-changes-at-do-remount-time fs/namespace.c --- lxc/fs

[PATCH 05/22] elevate mnt writers for callers of vfs_mkdir()

2007-02-09 Thread Dave Hansen
elevate mnt writers for callers of vfs_mkdir() Pretty self-explanatory. Fits in with the rest of the series. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c|5 + lxc-dave/fs/nfsd/nfs4recover.c |4 2 files changed, 9 insertions(+) diff -puN

[PATCH 09/22] mount_is_safe(): add comment

2007-02-09 Thread Dave Hansen
This area of code is currently #ifdef'd out, so add a comment for the time when it is actually used. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namespace.c |4 1 file changed, 4 insertions(+) diff -puN fs/namespace.c~11-24-mount-is-safe-add-comment fs/namespace.c

[PATCH 10/22] unix_find_other() elevate write count for touch_atime()

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/net/unix/af_unix.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff -puN net/unix/af_unix.c~12-24-unix-find-other-elevate-write-count-for-touch-atime net/unix/af_unix.c --- lxc/net/unix/af_unix.c~12-24

[PATCH 11/22] elevate write count over calls to vfs_rename()

2007-02-09 Thread Dave Hansen
This does create a little helper in the NFS code to make an if() a little bit less ugly. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c|4 lxc-dave/fs/nfsd/vfs.c | 23 +++ 2 files changed, 23 insertions(+), 4 deletions(-) diff -puN fs

[PATCH 18/22] do_rmdir(): elevate write count

2007-02-09 Thread Dave Hansen
Elevate the write count during the vfs_rmdir() call. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c |5 + 1 file changed, 5 insertions(+) diff -puN fs/namei.c~20-24-do-rmdir-elevate-write-count fs/namei.c --- lxc/fs/namei.c~20-24-do-rmdir-elevate-write-count

[PATCH 20/22] [PATCH] gfs: check nlink count

2007-02-09 Thread Dave Hansen
--- lxc-dave/fs/gfs2/inode.c |1 + 1 file changed, 1 insertion(+) diff -puN fs/gfs2/inode.c~gfs-check-nlink-count fs/gfs2/inode.c --- lxc/fs/gfs2/inode.c~gfs-check-nlink-count 2007-02-09 14:26:59.0 -0800 +++ lxc-dave/fs/gfs2/inode.c2007-02-09 14:26:59.0 -0800 @@

[PATCH 17/22] elevate mnt writers for vfs_unlink() callers

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c |4 lxc-dave/ipc/mqueue.c |5 - 2 files changed, 8 insertions(+), 1 deletion(-) diff -puN fs/namei.c~19-24-elevate-mnt-writers-for-vfs-unlink-callers fs/namei.c --- lxc/fs/namei.c~19-24-elevate-mnt

[PATCH 14/22] elevate write count for do_utimes()

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/utimes.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff -puN fs/utimes.c~16-24-elevate-write-count-for-do-utimes fs/utimes.c --- lxc/fs/utimes.c~16-24-elevate-write-count-for-do-utimes 2007-02-09 14

[PATCH 16/22] sys_mknodat(): elevate write count for vfs_mknod/create()

2007-02-09 Thread Dave Hansen
This takes care of all of the direct callers of vfs_mknod(). Since a few of these cases also handle normal file creation as well, this also covers some calls to vfs_create(). Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c | 12 lxc-dave/fs/nfsd

[PATCH 13/22] elevate writer count for do_sys_truncate()

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/open.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff -puN fs/open.c~15-24-elevate-writer-count-for-do-sys-truncate fs/open.c --- lxc/fs/open.c~15-24-elevate-writer-count-for-do-sys-truncate

[PATCH 15/22] elevate write count for do_sys_utime() and touch_atime()

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/inode.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff -puN fs/inode.c~17-24-elevate-write-count-for-do-sys-utime-and-touch-atime fs/inode.c --- lxc/fs/inode.c~17-24-elevate-write-count-for-do

[PATCH 12/22] elevate write count files are open()ed

2007-02-09 Thread Dave Hansen
created file, while the vfsmount is ro. That is bad. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/file_table.c |5 - lxc-dave/fs/namei.c | 22 ++ lxc-dave/ipc/mqueue.c|3 +++ 3 files changed, 25 insertions(+), 5 deletions(-) diff -puN fs

[PATCH 19/22] elevate writer count for custom struct_file

2007-02-09 Thread Dave Hansen
Some filesystems forego the use of normal vfs calls to create struct files. Make sure that these users elevate the mnt writer count. These probably don't have any real meaning because there is no real backing store for these mounts, but it is here for consistency. Signed-off-by: Dave Hansen

[PATCH 22/22] kill open files traverse on remount ro

2007-02-09 Thread Dave Hansen
Now that we have the sb writer count, and all of the writers marked with mnt_want_write(), we don't need to go looking at all of the individual open files. Kill the open files walk, and use the sb writer count. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/file_table.c

[PATCH 02/22] r/o bind mounts: add vfsmount writer counts

2007-02-09 Thread Dave Hansen
code that will safely check the counts before allowing r/w-r/o transitions to occur. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namespace.c| 53 + lxc-dave/fs/super.c| 18 ++--- lxc-dave/include/linux/fs.h

[PATCH 08/22] elevate mount count for extended attributes

2007-02-09 Thread Dave Hansen
This basically audits the callers of xattr_permission(), which calls permission() and can perform writes to the filesystem. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/nfsd/nfs4proc.c |7 ++- lxc-dave/fs/xattr.c | 14 ++ 2 files changed, 20

[PATCH 07/22] elevate write count for link and symlink calls

2007-02-09 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c | 10 ++ 1 file changed, 10 insertions(+) diff -puN fs/namei.c~09-24-elevate-write-count-for-link-and-symlink-calls fs/namei.c --- lxc/fs/namei.c~09-24-elevate-write-count-for-link-and-symlink-calls 2007-02-09

[PATCH 06/22] elevate write count during entire ncp_ioctl()

2007-02-09 Thread Dave Hansen
Some ioctls need write access, but others don't. Make a helper function to decide when write access is needed, and take it. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/ncpfs/ioctl.c | 55 +- 1 file changed, 54 insertions(+), 1

[PATCH 04/22] elevate writer count for chown and friends

2007-02-09 Thread Dave Hansen
chown/chmod,etc... don't call permission in the same way that the normal open for write calls do. They still write to the filesystem, so bump the write count during these operations. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/open.c | 37

Re: [PATCH 21/22] honor r/w changes at do_remount() time

2007-02-09 Thread Dave Hansen
On Fri, 2007-02-09 at 15:22 -0800, Andrew Morton wrote: On Fri, 09 Feb 2007 14:53:44 -0800 Dave Hansen [EMAIL PROTECTED] wrote: This is the core of the read-only bind mount patch set. Who wants read-only bind mounts, and for what reason? The original desire came out of the linux-vserver

Re: [PATCH 02/22] r/o bind mounts: add vfsmount writer counts

2007-02-09 Thread Dave Hansen
writes are performed with a want/drop pair. When that is complete, we can actually introduce code that will safely check the counts before allowing r/w-r/o transitions to occur. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namespace.c| 53

Re: [patch] PID namespace design bug, workaround

2007-11-01 Thread Dave Hansen
On Thu, 2007-11-01 at 07:56 -0700, Ulrich Drepper wrote: Pavel Emelyanov wrote: With this set we'll be able to mark pid namespaces as EXPERIMENTAL or even BROKEN, so nobody will be able to crate them. So can we, please, keep things as they are for now - the appropriate fix will be ready

[PATCH 02/27] make open_namei() return a filp

2007-11-01 Thread Dave Hansen
, then release them once the write for the filp has been established. Any caller who gets a 'struct file' back must consider that filp instantiated and fput() it normally. The callers no longer have to worry about ever manually releasing a mnt write count. Signed-off-by: Dave Hansen [EMAIL PROTECTED

[PATCH 03/27] kill do_filp_open()

2007-11-01 Thread Dave Hansen
This kills off the almost empty do_filp_open(). The indenting change in do_sys_open() is because we would have gone over our 80 characters otherwise. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/open.c | 39 ++- 1 file changed

[PATCH 04/27] kill filp_open()

2007-11-01 Thread Dave Hansen
Replace all callers with open_namei() directly, and move the nameidata stack allocation into open_namei(). Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/drivers/usb/gadget/file_storage.c |5 - linux-2.6.git-dave/fs/exec.c |2 linux-2.6.git

[PATCH 05/27] rename open_namei() to open_pathname()

2007-11-01 Thread Dave Hansen
open_namei() no longer touches namei's. rename it to something more appropriate: open_pathname(). Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/drivers/usb/gadget/file_storage.c |4 ++-- linux-2.6.git-dave/fs/exec.c |2 +- linux-2.6.git

[PATCH 08/27] r-o-bind-mounts-elevate-mnt-writers-for-callers-of-vfs_mkdir

2007-11-01 Thread Dave Hansen
Pretty self-explanatory. Fits in with the rest of the series. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namei.c|5 + linux-2.6.git-dave/fs/nfsd

[PATCH 00/27] Read-only bind mounts (-mm resend)

2007-11-01 Thread Dave Hansen
. It takes a directory and makes a regular bind and a r/o bind mount of it. It then performs some normal filesystem operations on the three directories, including ones that are expected to fail, like creating a file on the r/o mount. Signed-off-by: Dave Hansen [EMAIL PROTECTED] - To unsubscribe from

[PATCH 06/27] r-o-bind-mounts-stub-functions

2007-11-01 Thread Dave Hansen
. When that is complete, we can actually introduce code that will safely check the counts before allowing r/w-r/o transitions to occur. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Cc: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Acked-by: Serge Hallyn [EMAIL

[PATCH 09/27] r-o-bind-mounts-elevate-mnt-writers-for-vfs_unlink-callers

2007-11-01 Thread Dave Hansen
Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namei.c |4 linux-2.6.git-dave/ipc/mqueue.c |5 - 2 files changed, 8 insertions(+), 1 deletion(-) diff -puN fs

[PATCH 10/27] r-o-bind-mounts-elevate-mount-count-for-extended-attributes

2007-11-01 Thread Dave Hansen
This basically audits the callers of xattr_permission(), which calls permission() and can perform writes to the filesystem. Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/nfsd

[PATCH 01/27] do namei_flags calculation inside open_namei()

2007-11-01 Thread Dave Hansen
the nameidata_to_filp() calls into namei.c, and this gets the sys_open flags to a place where we can get at them when we need them. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namei.c | 43 +- linux-2.6.git-dave/fs/open.c | 22

[PATCH 07/27] r-o-bind-mounts-do_rmdir-elevate-write-count

2007-11-01 Thread Dave Hansen
Elevate the write count during the vfs_rmdir() call. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Acked-by: Serge Hallyn [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namei.c |5 + 1 file

[PATCH 13/27] r-o-bind-mounts-elevate-write-count-for-do_utimes

2007-11-01 Thread Dave Hansen
Now includes fix for oops seen by akpm. never let a libc developer write your kernel code - hch nor, apparently, a kernel developer - akpm Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Cc: Christoph

[PATCH 14/27] r-o-bind-mounts-elevate-write-count-for-file_update_time

2007-11-01 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/inode.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff -puN fs/inode.c~r-o-bind-mounts-elevate-write

[PATCH 11/27] r-o-bind-mounts-elevate-write-count-during-entire-ncp_ioctl

2007-11-01 Thread Dave Hansen
fs/ncpfs/ioctl.c: In function 'ncp_ioctl_need_write': fs/ncpfs/ioctl.c:852: error: label at end of compound statement Cc: Dave Hansen [EMAIL PROTECTED] Cc: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/ncpfs/ioctl.c | 57

[PATCH 15/27] r-o-bind-mounts-elevate-write-count-for-link-and-symlink-calls

2007-11-01 Thread Dave Hansen
Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namei.c | 10 ++ 1 file changed, 10 insertions(+) diff -puN fs/namei.c~r-o-bind-mounts-elevate-write-count-for-link

[PATCH 12/27] r-o-bind-mounts-elevate-write-count-for-do_sys_utime-and-touch_atime

2007-11-01 Thread Dave Hansen
Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/inode.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff -puN fs/inode.c~r-o-bind-mounts

[PATCH 16/27] r-o-bind-mounts-elevate-write-count-for-some-ioctls

2007-11-01 Thread Dave Hansen
-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/ext2/ioctl.c | 46 ++ linux-2.6.git-dave/fs/ext3/ioctl.c | 100 +++--- linux-2.6.git-dave/fs

[PATCH 17/27] r-o-bind-mounts-elevate-write-count-opend-files

2007-11-01 Thread Dave Hansen
this to fix a 'create, remount, fail r/w open()' race. Some filesystems forego the use of normal vfs calls to create struct files. Make sure that these users elevate the mnt writer count because they will get __fput(), and we need to make sure they're balanced. Signed-off-by: Dave Hansen [EMAIL

[PATCH 18/27] r-o-bind-mounts-elevate-write-count-over-calls-to-vfs_rename

2007-11-01 Thread Dave Hansen
This also uses the little helper in the NFS code to make an if() a little bit less ugly. We introduced the helper at the beginning of the series. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED

[PATCH 20/27] r-o-bind-mounts-elevate-writer-count-for-do_sys_truncate

2007-11-01 Thread Dave Hansen
Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/open.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff -puN fs/open.c~r-o-bind-mounts-elevate-writer

[PATCH 21/27] r-o-bind-mounts-make-access-use-mnt-check

2007-11-01 Thread Dave Hansen
-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/open.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -puN fs/open.c~r-o-bind-mounts-make-access-use-mnt-check fs/open.c --- linux-2.6.git/fs/open.c~r-o-bind-mounts

[PATCH 19/27] r-o-bind-mounts-elevate-writer-count-for-chown-and-friends

2007-11-01 Thread Dave Hansen
-off-by: Dave Hansen [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/open.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff -puN fs/open.c~r-o-bind-mounts

[PATCH 23/27] r-o-bind-mounts-sys_mknodat-elevate-write-count-for-vfs_mknod-create

2007-11-01 Thread Dave Hansen
logic outside of the switch and into a helper function suggested by Christoph. This also encapsulates a fix for mknod(S_IFREG) that Miklos found. Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6

[PATCH 24/27] r-o-bind-mounts-track-number-of-mount-writers

2007-11-01 Thread Dave Hansen
on percpu data when it only accesses N or fewer mounts.) Signed-off-by: Dave Hansen [EMAIL PROTECTED] Cc: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namespace.c| 205 --- linux-2.6.git-dave/include

[PATCH 22/27] r-o-bind-mounts-nfs-check-mnt-instead-of-superblock-directly

2007-11-01 Thread Dave Hansen
two are probably unnecessary and duplicate existing checks in the VFS. This won't make them better checks than before, but it will make them detect r/o mounts. Acked-by: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED

[PATCH 26/27] r-o-bind-mounts-honor-r-w-changes-at-do_remount-time

2007-11-01 Thread Dave Hansen
' operation. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Cc: Christoph Hellwig [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namespace.c| 46 ++- linux-2.6.git-dave/include/linux/mount.h |1 2 files changed, 40

[PATCH 25/27] r-o-bind-mounts-track-number-of-mount-writers-make-lockdep-happy-with-r-o-bind-mounts

2007-11-01 Thread Dave Hansen
With the r/o bind mount patches, we can have as many spinlocks nested as there are CPUs on the system. Lockdep freaks out after 8. So, create a new lockdep class of locks for the mnt_writer spinlocks, and initialize each of the cpu locks to be in a different class. It should shut up warnings

[PATCH 27/27] keep track of mnt_writer state of struct file

2007-11-01 Thread Dave Hansen
having any oopses or mnt_writer count imbalances. I'm quite convinced that this is a good thing because it found bugs in the stuff I was working on as soon as I wrote it. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/file_table.c| 21 +++-- linux

Re: [patch] PID namespace design bug, workaround

2007-11-02 Thread Dave Hansen
On Fri, 2007-11-02 at 01:04 -0700, Andrew Morton wrote: That is the fix you were referring to? I was hoping you have a sketch for a real solution. If nobody can think of a way to fix this PID Looks like we misunderstood each other. Can you please elaborate on what exactly is broken

Re: [patch] PID namespaces

2007-11-04 Thread Dave Hansen
On Sun, 2007-11-04 at 11:38 +0100, Ingo Molnar wrote: I.e. keep the namespace functionality but use a modulo 1.000.000 base for the PIDs so that it all looks nicer to the user. Minimal visibility difference but maximum compatibility. (The resulting limits are reasonable: 1 million tasks per

Re: msync(2) bug(?), returns AOP_WRITEPAGE_ACTIVATE to userland

2007-11-05 Thread Dave Hansen
On Mon, 2007-11-05 at 15:40 +, Hugh Dickins wrote: The second problem was a hang: all cpus in handle_write_count_underflow doing lock_and_coalesce_cpu_mnt_writer_counts: new -mm stuff from Dave Hansen. At first I thought that was a locking problem in Dave's code, but I now suspect it's

[PATCH] r/o bind mounts: fix buggy loop

2007-11-06 Thread Dave Hansen
locking up. It will also warn a lot earlier that something funky is going on. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/namespace.c| 31 ++- linux-2.6.git-dave/include/linux/mount.h |1 + 2 files changed, 23 insertions(+), 9

Re: [Patch] Allocate sparse vmemmap block above 4G

2007-11-07 Thread Dave Hansen
On Wed, 2007-11-07 at 15:07 +0800, Zou Nan hai wrote: Try to allocate sparse vmemmap block above 4G on x64 system. On some single node x64 system with huge amount of physical memory e.g 64G. the memmap size maybe very big. Could we just change the default bootmem behavior to allocate

2.6.23 git current compile error on UP

2007-11-08 Thread Dave Hansen
drivers/kvm/kvm_main.c: In function `kvm_flush_remote_tlbs': drivers/kvm/kvm_main.c:220: error: implicit declaration of function `smp_call_function_mask' make[2]: *** [drivers/kvm/kvm_main.o] Error 1 make[1]: *** [drivers/kvm] Error 2 http://sr71.net/~dave/linux/config-kvm-up Looks like that

Re: OOPSes + WARNING: at fs/file_table.c:262 __fput() in -mm 2007-11-06-02-32++

2007-11-09 Thread Dave Hansen
On Fri, 2007-11-09 at 13:23 -0500, Erez Zadok wrote: Setup: FC6 system with MM snapshot broken-out-2007-11-06-02-32 and these two patches added: r-o-bind-mounts-track-number-of-mount-writer-fix-buggy-loop.patch

[PATCH 1/2] create file_drop_write_access() helper

2007-11-09 Thread Dave Hansen
this in the next patch. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/file_table.c | 46 +--- linux-2.6.git-dave/include/linux/file.h |1 2 files changed, 32 insertions(+), 15 deletions(-) diff -puN fs/file_table.c~create

[PATCH 2/2] fix up new filp allocators

2007-11-09 Thread Dave Hansen
Some new uses of get_empty_filp() have crept in, and are not properly taking mnt_want_write()s. This fixes them up. We really need to kill get_empty_filp(). Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- linux-2.6.git-dave/fs/anon_inodes.c| 16 ++-- linux-2.6.git-dave/fs

Re: [PATCH 2/2] fix up new filp allocators

2007-11-09 Thread Dave Hansen
On Fri, 2007-11-09 at 16:26 -0500, Trond Myklebust wrote: #include linux/sunrpc/svc.h #include linux/nfsd/nfsd.h #include linux/nfsd/cache.h +#include linux/file.h #include linux/mount.h #include linux/workqueue.h #include linux/smp_lock.h @@ -1303,7 +1304,7 @@ static inline

Re: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug

2012-07-11 Thread Dave Hansen
On 07/09/2012 03:25 AM, Yasuaki Ishimatsu wrote: @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start, } /* create new memmap entry */ - firmware_map_add_hotplug(start, start + size, System RAM); + firmware_map_add_hotplug(start, start + size - 1, System RAM); I

Re: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug

2012-07-12 Thread Dave Hansen
On 07/11/2012 09:52 PM, Yasuaki Ishimatsu wrote: Does the following patch include your comment? If O.K., I will separate the patch from the series and send it for bug fix. Looks sane to me. It does now mean that the calling conventions for some of the other firmware_map*() functions are

[PATCH] Debugging: Keep track of page owners

2012-12-07 Thread Dave Hansen
From: m...@skynet.ie (Mel Gorman) PAGE_OWNER tracks free pages by setting page-order to -1. However, it is set during __free_pages() which is not the only free path as __pagevec_free() and free_compound_page() do not go through __free_pages(). This leads to a situation where free pages are

[RFCv2][PATCH 1/3] create slow_virt_to_phys()

2012-12-07 Thread Dave Hansen
a new function slow_virt_to_phys(), which walks the kernel page tables on x86 and should do precisely the same logical thing as __pa(), but actually work on a wider range of memory. It should work on the normal linear mapping, vmalloc(), kmap(), etc... Signed-off-by: Dave Hansen d

[RFCv2][PATCH 3/3] make DEBUG_VIRTUAL work earlier in boot

2012-12-07 Thread Dave Hansen
The KVM code has some repeated bugs in it around use of __pa() on per-cpu data. Those data are not in an area on which __pa() is valid. However, they are also called early enough in boot that __vmalloc_start_set is not set, and thus the CONFIG_DEBUG_VIRTUAL debugging does not catch them. This

[RFCv2][PATCH 2/3] fix kvm's use of __pa() on percpu areas

2012-12-07 Thread Dave Hansen
for the page fault (it was injected by the host), assumed that the kernel had taken a _real_ page fault, and panic()'d. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/arch/x86/kernel/kvm.c |9 + linux-2.6.git-dave/arch/x86/kernel/kvmclock.c |4 ++-- 2 files

Re: [PATCH] Debugging: Keep track of page owners

2012-12-07 Thread Dave Hansen
On 12/07/2012 02:26 PM, Andrew Morton wrote:\ I have cunningly divined the intention of your update and have queued the below incremental. The change to pagetypeinfo_showmixedcount_print() was a surprise. What's that there for? Do you mean to ask why it's being modified at all here in this

Re: [PATCH] Debugging: Keep track of page owners

2012-12-07 Thread Dave Hansen
On 12/07/2012 02:44 PM, Andrew Morton wrote: AFACIT that difference was undescribed. I can see that the new version uses the stack-tracing infrastructure, but the change to pagetypeinfo_showmixedcount_print() is a mystery. Ahhh, I assume you're talking about this hunk: @@ -976,10 +976,7 @@

Re: [PATCH] mm: add node physical memory range to sysfs

2012-12-07 Thread Dave Hansen
On 12/07/2012 03:51 PM, Andrew Morton wrote: +static ssize_t node_read_memrange(struct device *dev, +struct device_attribute *attr, char *buf) +{ + int nid = dev-id; + unsigned long start_pfn = NODE_DATA(nid)-node_start_pfn; + unsigned long end_pfn =

[3.7-rc6] capture_free_page() frees page without accounting for them??

2012-11-20 Thread Dave Hansen
Hi Mel, I'm chasing an apparent memory leak introduced post-3.6. The interesting thing is that it appears that the pages are in the allocator, but not being accounted for: http://www.spinics.net/lists/linux-mm/msg46187.html https://bugzilla.kernel.org/show_bug.cgi?id=50181 I

Re: [3.7-rc6] capture_free_page() frees page without accounting for them??

2012-11-20 Thread Dave Hansen
I'm really evil, so I changed the loop in compact_capture_page() to basically steal the highest-order page it can. This shouldn't _break_ anything, but it does ensure that we'll be splitting pages that we find more often and recreating this *MUCH* faster: - for (order = cc-order;

[PATCH] [3.7-rc] fix incorrect NR_FREE_PAGES accounting (appears like memory leak)

2012-11-21 Thread Dave Hansen
. The amount leaked very closely tracks the imbalance I see in buddy pages vs. NR_FREE_PAGES. I have confirmed that this patch fixes the imbalance Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com Acked-by: Mel Gorman mgor...@suse.de --- linux-2.6.git-dave/mm/page_alloc.c |2 +- 1 file changed, 1

Re: [PATCH] mm: compaction: Fix return value of capture_free_page

2012-11-26 Thread Dave Hansen
On 11/26/2012 03:23 AM, Mel Gorman wrote: On Wed, Nov 21, 2012 at 02:21:51PM -0500, Dave Hansen wrote: This needs to make it in before 3.7 is released. This is also required. Dave, can you double check? The surprise is that this does not blow up very obviously. ... @@ -1422,7 +1422,7

32/64-bit NUMA consolidation behavior regresion

2012-11-28 Thread Dave Hansen
Hi Tejun, I was bisecting a boot problem on a 32-bit NUMA kernel and it bisected down to commit 8db78cc4. It turns out that, with this patch, pcpu_need_numa() changed its return value on my system from 1 to 0. What that basically meant was that we stopped using the remapped lowmem areas for

[RFC][PATCH 1/2] create slow_virt_to_phys()

2012-11-28 Thread Dave Hansen
a new function slow_virt_to_phys(), which walks the kernel page tables on x86 and should do precisely the same logical thing as __pa(), but actually work on a wider range of memory. It should work on the normal linear mapping, vmalloc(), kmap(), etc... Signed-off-by: Dave Hansen d

[RFC][PATCH 2/2] fix kvm's use of __pa() on percpu areas

2012-11-28 Thread Dave Hansen
for the page fault (it was injected by the host), assumed that the kernel had taken a _real_ page fault, and panic()'d. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/arch/x86/kernel/kvm.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN arch/x86

[PATCH 0/7] Put Kernel hacking Kconfig menu on a diet

2012-12-17 Thread Dave Hansen
I think the Kernel Hacking menu has gotten a bit out of hand. It is over 120 lines long on my system with everything enabled and options are scattered around it haphazardly. http://sr71.net/~dave/linux/kconfig-horror.png Let's try to introduce some sanity. I believe the risk of a

[PATCH 3/7] order memory debugging Kconfig options

2012-12-17 Thread Dave Hansen
having an arch/foo/Kconfig.debug-memory might be taking things a bit too far Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/lib/Kconfig.debug | 702 +-- 1 file changed, 356 insertions(+), 346 deletions(-) diff -puN arch/x86/Kconfig.debug

[PATCH 2/7] consolidate per-arch stack overflow debugging options

2012-12-17 Thread Dave Hansen
the actual menu option. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/arch/blackfin/Kconfig |1 + linux-2.6.git-dave/arch/blackfin/Kconfig.debug |7 --- linux-2.6.git-dave/arch/frv/Kconfig|1 + linux-2.6.git-dave/arch/frv/Kconfig.debug

[PATCH 4/7] consolidate RCU debugging Kconfig options

2012-12-17 Thread Dave Hansen
These were in two different places, and taking up too much of my valuable screen real-estate. Banish them to their own menu. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/lib/Kconfig.debug | 160 +-- 1 file changed, 82 insertions

[PATCH 1/7] move debugfs to filesystems menu (fs/Kconfig)

2012-12-17 Thread Dave Hansen
, configfs, or /proc. Also, Debug filesystem sounds like a debugging option _for_ filesystems code, not a filesystem for debugging. We also never call it the debug filesystem. We always say debugfs, so reflect the fact that we _call_ it debugfs in the menu text. Signed-off-by: Dave Hansen d

[PATCH 5/7] consolidate runtime testing configs

2012-12-17 Thread Dave Hansen
. This menu should only be used for tests that do not have a more appropriate home. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/lib/Kconfig.debug | 151 ++- 1 file changed, 78 insertions(+), 73 deletions(-) diff -puN lib/Kconfig.debug

[PATCH 7/7] group locking debugging options

2012-12-17 Thread Dave Hansen
There are quite a few of these, and we want to make sure that there is one-stop-shopping for lock debugging. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/lib/Kconfig.debug | 120 ++- 1 file changed, 62 insertions(+), 58 deletions

[PATCH 6/7] consolidate compilation option configs

2012-12-17 Thread Dave Hansen
even though I'm actually moving the options on either side of it. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- linux-2.6.git-dave/lib/Kconfig.debug | 156 +-- 1 file changed, 80 insertions(+), 76 deletions(-) diff -puN lib/Kconfig.debug~consolidate

Re: [PATCH 7/8] zswap: add to mm/

2013-01-02 Thread Dave Hansen
On 01/01/2013 09:52 AM, Seth Jennings wrote: On 12/31/2012 05:06 PM, Dan Magenheimer wrote: A second related issue that concerns me is that, although you are now, like zcache2, using an LRU queue for compressed pages (aka zpages), there is no relationship between that queue and physical

Re: [PATCH 7/8] zswap: add to mm/

2013-01-02 Thread Dave Hansen
On 01/02/2013 09:26 AM, Dan Magenheimer wrote: However if one compares the total percentage of RAM used for zpages by zswap vs the total percentage of RAM used by slab, I suspect that the zswap number will dominate, perhaps because zswap is storing primarily data and slab is storing primarily

Re: [RFC 2/8] Don't allow volatile attribute on THP and KSM

2013-01-03 Thread Dave Hansen
On 01/02/2013 08:28 PM, Minchan Kim wrote: VOLATILE imply the the pages in the range isn't working set any more so it's pointless that make them to THP/KSM. One of the points of this implementation is that it be able to preserve memory contents when there is no pressure. If those contents

Re: [PATCH] mm: add node physical memory range to sysfs

2012-12-12 Thread Dave Hansen
On 12/12/2012 05:18 PM, Davidlohr Bueso wrote: On Fri, 2012-12-07 at 16:17 -0800, Dave Hansen wrote: Seems like the better way to do this would be to expose the DIMMs themselves in some way, and then map _those_ back to a node. Good point, and from a DIMM perspective, I agree, and will look

Re: [PATCH] mm: add node physical memory range to sysfs

2012-12-12 Thread Dave Hansen
On 12/12/2012 06:03 PM, Davidlohr Bueso wrote: On Wed, 2012-12-12 at 17:48 -0800, Dave Hansen wrote: But if we went and did it per-DIMM (showing which physical addresses and NUMA nodes a DIMM maps to), wouldn't that be redundant with this proposed interface? If DIMMs overlap between nodes

<    2   3   4   5   6   7   8   9   10   11   >