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 ve

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 percp

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

2012-11-28 Thread Dave Hansen
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 --- linux-2.6

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

2012-11-28 Thread Dave Hansen
on 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 --- linux-2.6.git-dave/arch/x86/kernel/kvm.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN arch/x86/kernel/kvm

Re: [PATCHv2, RFC 01/30] block: implement add_bdi_stat()

2013-03-21 Thread Dave Hansen
On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > It's required for batched stats update. The description here is a little terse. Could you at least also describe how and where it's going to get used in later patches? Just a sentence or two more would be really

Re: [PATCHv2, RFC 02/30] mm: implement zero_huge_user_segment and friends

2013-03-21 Thread Dave Hansen
On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: > Let's add helpers to clear huge page segment(s). They provide the same > functionallity as zero_user_segment{,s} and zero_user, but for huge > pages ... > +static inline void zero_huge_user_segments(struct page *page, > + unsigned star

Re: [PATCHv2, RFC 03/30] mm: drop actor argument of do_generic_file_read()

2013-03-21 Thread Dave Hansen
On 03/15/2013 06:22 AM, Kirill A. Shutemov wrote: > Hillf Danton wrote: >> On Fri, Mar 15, 2013 at 1:50 AM, Kirill A. Shutemov >> wrote: >>> >>> There's only one caller of do_generic_file_read() and the only actor is >>> file_read_actor(). No reason to have a callback parameter. >>> >> This cleanu

Re: [PATCHv2, RFC 04/30] radix-tree: implement preload for multiple contiguous elements

2013-03-21 Thread Dave Hansen
On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > Currently radix_tree_preload() only guarantees enough nodes to insert > one element. It's a hard limit. You cannot batch a number insert under > one tree_lock. > > This patch introduces radix_tree_preload_count().

Re: [PATCHv2, RFC 05/30] thp, mm: avoid PageUnevictable on active/inactive lru lists

2013-03-21 Thread Dave Hansen
On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: > active/inactive lru lists can contain unevicable pages (i.e. ramfs pages > that have been placed on the LRU lists when first allocated), but these > pages must not have PageUnevictable set - otherwise shrink_active_list > goes crazy: ... > For lru

Re: [PATCHv2, RFC 07/30] thp, mm: introduce mapping_can_have_hugepages() predicate

2013-03-21 Thread Dave Hansen
On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: > +static inline bool mapping_can_have_hugepages(struct address_space *m) > +{ > + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { > + gfp_t gfp_mask = mapping_gfp_mask(m); > + return !!(gfp_mask & __GFP_COMP); > + } >

[RFC][PATCH] PAGE_OWNER now depends on STACKTRACE_SUPPORT

2013-02-06 Thread Dave Hansen
=m68k allmodconfig All warnings: warning: (PAGE_OWNER && STACK_TRACER && BLK_DEV_IO_TRACE && KMEMCHECK) selects STACKTRACE which has unmet direct dependencies (STACKTRACE_SUPPORT) Reported-by: Fengguang Wu Signed-off-by: Dave Hansen --- linux-2.6.git-dave/lib/Kc

Re: PAE problems was [RFC] Reproducible OOM with just a few sleeps

2013-02-06 Thread Dave Hansen
On 02/01/2013 02:25 AM, Pavel Machek wrote: > Ouch, and... IIRC (hpa should know for sure), PAE is neccessary for > R^X support on x86, thus getting more common, not less. If it does not > work, that's bad news. Dare I ask what "R^X" is? -- To unsubscribe from this list: send the line "unsubscrib

[PATCH 1/2] add helper for highmem checks

2013-02-08 Thread Dave Hansen
plus is also kind to our new debugging check. Signed-off-by: Dave Hansen --- linux-2.6.git-dave/arch/x86/mm/pat.c | 11 ++- linux-2.6.git-dave/drivers/char/mem.c|4 ++-- linux-2.6.git-dave/drivers/mtd/mtdchar.c |2 +- linux-2.6.git-dave/include/linux/mm.h|

[PATCH 2/2] make /dev/kmem return error for highmem

2013-02-08 Thread Dave Hansen
had we not ripped it out: https://patchwork.kernel.org/patch/2075911/ Signed-off-by: Dave Hansen --- linux-2.6.git-dave/drivers/char/mem.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff -puN drivers/char/mem.c~make-kmem-return-error-for-highmem drivers/char

Re: [PATCH 1/2] add helper for highmem checks

2013-02-08 Thread Dave Hansen
On 02/08/2013 12:50 PM, H. Peter Anvin wrote: > On 02/08/2013 12:28 PM, Dave Hansen wrote: >> +static inline phys_addr_t last_lowmem_phys_addr(void) >> +{ >> +/* >> + * 'high_memory' is not a pointer that can be dereferenced, so >>

Re: [PATCH 1/2] add helper for highmem checks

2013-02-11 Thread Dave Hansen
On 02/09/2013 02:47 AM, Borislav Petkov wrote: > On Sat, Feb 09, 2013 at 10:41:21AM +0100, Borislav Petkov wrote: > With this change, they definitely fix something because I even get X on > the box started. Previously, it would spit out the warning and wouldn't > start X with the login window. And

sched/cputime: sig->prev_stime underflow

2013-04-04 Thread Dave Hansen
With the 3.9-rcs (and probably much earlier) I'm seeing some weird top output where the cpu time "spent" is millions of hours: 445 root 20 0 000 S0 0.0 5124095h kworker/45:1 404 root 20 0 000 S0 0.0 5124095h kworker/4:1 I see it mostly with kernel

kernel BUG at kernel/smpboot.c:134!

2013-04-05 Thread Dave Hansen
Hey Thomas, I seem to be running in to smpboot_thread_fn()'s BUG_ON(td->cpu != smp_processor_id()); pretty regularly, both at boot and if I boot with maxcpus=x and then online the CPUs from sysfs after boot. It's a 160-logical-cpu system, so it's quite a beast. I _seem_ to be hitting i

Re: [RFC] Reproducible OOM with just a few sleeps

2013-01-30 Thread Dave Hansen
On 01/30/2013 04:51 AM, Pavel Machek wrote: > Are you saying that HIGHMEM configuration with 4GB ram is not expected > to work? Not really. The assertion was that 4GB with no PAE passed a forkbomb test (ooming) while 4GB of RAM with PAE hung, thus _PAE_ is broken. -- To unsubscribe from this lis

[RFC][PATCH] rip out x86_32 NUMA remapping code

2013-01-30 Thread Dave Hansen
This code was an optimization for 32-bit NUMA systems. It has probably been the cause of a number of subtle bugs over the years, although the conditions to excite them would have been hard to trigger. Essentially, we remap part of the kernel linear mapping area, and then sometimes part of that a

Re: [RFC][PATCH] rip out x86_32 NUMA remapping code

2013-01-31 Thread Dave Hansen
On 01/31/2013 02:03 PM, H. Peter Anvin wrote: > That is arch-independent code, and the tile architecture still uses it. > > Makes one wonder how much it will get tested going forward, especially > with the x86-32 implementation clearly lacking in that department. Yeah, I left the tile one because

Re: [PATCH 0/5] [v3] fix illegal use of __pa() in KVM code

2013-01-25 Thread Dave Hansen
On 01/22/2013 01:24 PM, Dave Hansen wrote: > This series fixes a hard-to-debug early boot hang on 32-bit > NUMA systems. It adds coverage to the debugging code, > adds some helpers, and eventually fixes the original bug I > was hitting. I got one more reviewed-by on this set, but

Re: [PATCH] x86, numa: Use __pa_nodebug instead

2013-01-28 Thread Dave Hansen
86/mm/numa.c:3: > /home/boris/w/kernel/linux-2.6/arch/x86/include/asm/page_64.h:12:29: note: > expected ‘long unsigned int’ but argument is of type ‘void *’ > > Signed-off-by: Borislav Petkov > Cc: Dave Hansen I was just about to send out a patch for it and came up with the same f

[PATCH] fix 32-bit compile warning from printk()

2013-01-28 Thread Dave Hansen
hat. We will consider it an unsigned long long, and cast to it explicitly. Signed-off-by: Dave Hansen --- linux-2.6.git-dave/arch/x86/kernel/kvm.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN arch/x86/kernel/kvm.c~fix-32-bit-compile-warning arch/x86/kernel/kvm.c --- li

Re: [PATCH 0/5] [v3] fix illegal use of __pa() in KVM code

2013-02-25 Thread Dave Hansen
On 02/24/2013 01:28 PM, Peter Hurley wrote: > Now that the alloc_remap() has been/is being removed, is most/all of > this being reverted? I _believe_ alloc_remap() is the only case where we actually remapped low memory. However, there is still other code that does __pa() translations for percpu a

Re: [patch] mm, show_mem: suppress page counts in non-blockable contexts

2013-02-27 Thread Dave Hansen
On 02/26/2013 04:46 PM, David Rientjes wrote: > diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c > --- a/arch/arm/mm/init.c > +++ b/arch/arm/mm/init.c > @@ -99,6 +99,9 @@ void show_mem(unsigned int filter) > printk("Mem-info:\n"); > show_free_areas(filter); > > + if (filter & S

Re: Linux Kernel Commit 025cee7f8fef02af09b03c8e1cd9843cb32adf9b

2013-02-28 Thread Dave Hansen
On 02/28/2013 02:11 PM, John L. Males wrote: > Would the Linux Kernel under "unique" Virtual Memory Subsystem > stress excite some of these "subtle bugs" in Linux Kernels > prior to this change set for Commit > 025cee7f8fef02af09b03c8e1cd9843cb32adf9b? I don't think stress would really do it. It

Re: [PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-02-05 Thread Dave Hansen
On Tue, 2008-02-05 at 04:51 -0500, Oren Laadan wrote: > That said, I suggest the following method instead (this is the method > we use in Zap to determine the desired resource identifier when a new > resource is allocated; I recall that we had discussed it in the past, > perhaps the mini-summit in

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-24 Thread Dave Hansen
On 10/24/2012 12:54 PM, Andrew Morton wrote: > hmpf. This patch worries me. If there are people out there who are > regularly using drop_caches because the VM sucks, it seems pretty > obnoxious of us to go dumping stuff into their syslog. What are they > supposed to do? Stop using drop_caches?

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-24 Thread Dave Hansen
On 10/24/2012 02:06 PM, Borislav Petkov wrote: > On Wed, Oct 24, 2012 at 01:48:36PM -0700, Andrew Morton wrote: >> Well who knows. Could be that people's vm *does* suck. Or they have >> some particularly peculiar worklosd or requirement[*]. Or their VM >> *used* to suck, and the drop_caches is not

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-24 Thread Dave Hansen
On 10/24/2012 03:48 PM, Borislav Petkov wrote: > On Wed, Oct 24, 2012 at 02:18:38PM -0700, Dave Hansen wrote: >> Sounds fairly valid to me. But, it's also one that would not be harmed >> or disrupted in any way because of a single additional printk() during >> each

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-25 Thread Dave Hansen
On 10/25/2012 02:24 AM, Borislav Petkov wrote: > But let's discuss this a bit further. So, for the benchmarking aspect, > you're either going to have to always require dmesg along with > benchmarking results or /proc/vmstat, depending on where the drop_caches > stats end up. > > Is this how you en

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-11 Thread Dave Hansen
On Mon, 2008-02-11 at 17:24 +0100, Jan-Bernd Themann wrote: > the eHEA patch belongs to a patchset that is usually > added by Jeff Garzik once this dependency (EXPORTS) > is resolved. I know that's already in mainline but, man, that code is nasty. It has stuff indented 7 levels or so and is vi

Re: [PATCH][RESEND] drivers/base: export (un)register_memory_notifier

2008-02-11 Thread Dave Hansen
On Mon, 2008-02-11 at 10:49 +0100, Jan-Bernd Themann wrote: > are you the right person to address this patch to? You might want to check the top of the file. ;) > --- a/drivers/base/memory.c > +++ b/drivers/base/memory.c > @@ -52,11 +52,13 @@ int register_memory_notifier(struct notifier_block *nb

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-11 Thread Dave Hansen
On Mon, 2008-02-11 at 17:24 +0100, Jan-Bernd Themann wrote: > Drivers like eHEA need memory notifiers in order to > update their internal DMA memory map when memory is added > to or removed from the system. > > Patch for eHEA memory hotplug support that uses these functions: > http://www.spinics.

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-11 Thread Dave Hansen
On Mon, 2008-02-11 at 16:57 +0100, Jan-Bernd Themann wrote: > Drivers like eHEA need memory notifiers in order to > update their internal DMA memory map when memory is added > to or removed from the system. Could you post this with the new users as well so we can make sure they're not abusing thi

Re: [-mm PATCH] register_memory/unregister_memory clean ups

2008-02-12 Thread Dave Hansen
On Tue, 2008-02-12 at 15:03 -0800, Badari Pulavarty wrote: > Here is the version with your suggestion. Do you like this better ? I do like how it looks, better, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More m

Re: [-mm PATCH] register_memory/unregister_memory clean ups

2008-02-12 Thread Dave Hansen
On Tue, 2008-02-12 at 14:07 -0800, Badari Pulavarty wrote: > On Tue, 2008-02-12 at 13:57 -0800, Dave Hansen wrote: > > On Tue, 2008-02-12 at 13:56 -0800, Badari Pulavarty wrote: > > > > > > +static void __remove_section(struct zone *zone, unsigned long > > > s

Re: [-mm PATCH] register_memory/unregister_memory clean ups

2008-02-12 Thread Dave Hansen
On Tue, 2008-02-12 at 13:56 -0800, Badari Pulavarty wrote: > > > + /* > > > +* Its ugly, but this is the best I can do - HELP !! > > > +* We don't know where the allocations for section memmap and usemap > > > +* came from. If they are allocated at the boot time, they would come > > >

Re: [-mm PATCH] register_memory/unregister_memory clean ups

2008-02-12 Thread Dave Hansen
On Tue, 2008-02-12 at 13:56 -0800, Badari Pulavarty wrote: > > +static void __remove_section(struct zone *zone, unsigned long > section_nr) > +{ > + if (!valid_section_nr(section_nr)) > + return; > + > + unregister_memory_section(__nr_to_section(section_nr)); > + s

Re: [-mm PATCH] register_memory/unregister_memory clean ups

2008-02-12 Thread Dave Hansen
On Tue, 2008-02-12 at 09:22 -0800, Badari Pulavarty wrote: > +static void __remove_section(struct zone *zone, unsigned long phys_start_pfn) > +{ > + if (!pfn_valid(phys_start_pfn)) > + return; I think you need at least a WARN_ON() there. I'd probably also not use pfn_valid(), pe

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-12 Thread Dave Hansen
On Mon, 2008-02-11 at 17:24 +0100, Jan-Bernd Themann wrote: > Drivers like eHEA need memory notifiers in order to > update their internal DMA memory map when memory is added > to or removed from the system. > > Patch for eHEA memory hotplug support that uses these functions: > http://www.spinics.

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-13 Thread Dave Hansen
On Wed, 2008-02-13 at 16:17 +0100, Jan-Bernd Themann wrote: > Constraints imposed by HW / FW: > - eHEA has own MMU > - eHEA Memory Regions (MRs) are used by the eHEA MMU to translate virtual > addresses to absolute addresses (like DMA mapped memory on a PCI bus) > - The number of MRs is limited

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-14 Thread Dave Hansen
On Thu, 2008-02-14 at 09:46 +0100, Christoph Raisch wrote: > Dave Hansen <[EMAIL PROTECTED]> wrote on 13.02.2008 18:05:00: > > On Wed, 2008-02-13 at 16:17 +0100, Jan-Bernd Themann wrote: > > > Constraints imposed by HW / FW: > > > - eHEA has own MMU > > >

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-14 Thread Dave Hansen
On Thu, 2008-02-14 at 09:36 -0800, Badari Pulavarty wrote: > > I am not sure what you are trying to do with walk_memory_resource(). > The > behavior is different on ppc64. Hotplug memory usage assumes that all > the memory resources (all system memory, not just IOMEM) are > represented > in /proc

Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier

2008-02-15 Thread Dave Hansen
On Fri, 2008-02-15 at 14:22 +0100, Christoph Raisch wrote: > A translation from kernel to ehea_bmap space should be fast and > predictable > (ruling out hashes). > If a driver doesn't know anything else about the mapping structure, > the normal solution in kernel for this type of problem is a multi

[PATCH 27/30] r/o bind mounts: get callers of vfs_mknod/create()

2008-02-15 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: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTE

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

2008-02-15 Thread Dave Hansen
, it could stay on percpu data when it only accesses N or fewer mounts.) Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- linux-2.

[PATCH 29/30] r/o bind mounts: honor mount writer counts at remount

2008-02-15 Thread Dave Hansen
7;mount -o remount,ro' operation: If you wish to have a r/o bind mount of /foo on bar: mount --bind /foo /bar mount -o remount,ro /bar Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL

[PATCH 30/30] r/o bind mounts: debugging for missed calls

2008-02-15 Thread Dave Hansen
rced remount r/o fix from Dave and akpm's fix for the fix] Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- linux-2.6.git-dave

[PATCH 16/30] r/o bind mounts: elevate write count for do_utimes()

2008-02-15 Thread Dave Hansen
[EMAIL PROTECTED]> Cc: Balbir Singh <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/utimes.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff -puN fs/utimes.c~r-o-bind-mounts-elevate-write-count-for-do_uti

[PATCH 18/30] r/o bind mounts: write counts for link/symlink

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[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-wr

[PATCH 06/30] merge open_namei() and do_filp_open()

2008-02-15 Thread Dave Hansen
er to namei.c so it can be close to its buddy: do_filp_open(). It also gets a kerneldoc comment in the process. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave H

[PATCH 23/30] r/o bind mounts: write counts for truncate()

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[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-mou

[PATCH 25/30] r/o bind mounts: make access() use new r/o helper

2008-02-15 Thread Dave Hansen
: 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 | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -puN fs/open.c~r-o-bind-mounts

[PATCH 05/30] do namei_flags calculation inside open_namei()

2008-02-15 Thread Dave Hansen
g 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. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git

[PATCH 04/30] fix up new filp allocators

2008-02-15 Thread Dave Hansen
ECTED]> Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/anon_inodes.c | 16 ++-- linux-2.6.gi

[PATCH 24/30] r/o bind mounts: elevate count for xfs timestamp updates

2008-02-15 Thread Dave Hansen
y: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/xfs/linux-2.6/xfs_iops.c |7 --- linux-2.6.git-dave/fs/xfs/linux-2.6/xfs_lrw.c |9 - 2 files changed,

[PATCH 19/30] r/o bind mounts: elevate write count for ioctls()

2008-02-15 Thread Dave Hansen
Some ioctl()s can cause writes to the filesystem. Take these, and make them use mnt_want/drop_write() instead. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton

[PATCH 22/30] r/o bind mounts: elevate write count for chmod/chown callers

2008-02-15 Thread Dave Hansen
ROTECTED]> Signed-off-by: Dave Hansen <[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-elevate-writer

[PATCH 14/30] r/o bind mounts: elevate write count for ncp_ioctl()

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/ncpfs/ioctl.c | 54

[PATCH 01/30] reiserfs: eliminate private use of struct file in xattr

2008-02-15 Thread Dave Hansen
the xattr directories. Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]> Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]>

[PATCH 09/30] r/o bind mounts: drop write during emergency remount

2008-02-15 Thread Dave Hansen
TED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/super.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff -puN fs/super.c~robind-sysrq-fix fs/super.c --- linux-2.6.git

[PATCH 08/30] r/o bind mounts: create helper to drop file write access

2008-02-15 Thread Dave Hansen
If someone decides to demote a file from r/w to just r/o, they can use this same code as __fput(). NFS does just that, and will use this in the next patch. Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Cc: Erez Zadok <[EMAIL PROTECTED]> Cc: Trond Myklebust <[EMAIL PROTECTED

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

2008-02-15 Thread Dave Hansen
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. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[

[PATCH 11/30] r/o bind mounts: elevate write count for callers of vfs_mkdir()

2008-02-15 Thread Dave Hansen
Pretty self-explanatory. Fits in with the rest of the series. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux

[PATCH 21/30] r/o bind mounts: get write access for vfs_rename() callers

2008-02-15 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. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECT

[PATCH 20/30] r/o bind mounts: elevate write count for open()s

2008-02-15 Thread Dave Hansen
ruct 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. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]

[PATCH 10/30] r/o bind mounts: elevate write count for vfs_rmdir()

2008-02-15 Thread Dave Hansen
Elevate the write count during the vfs_rmdir() call. Acked-by: Serge Hallyn <[EMAIL PROTECTED]> Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EM

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

2008-02-15 Thread Dave Hansen
ed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/namespace.c| 54 +++ linux-2.6.git-dave/include/linux/mount.h |3 + 2 files changed, 57 insertions(+) diff -puN fs/namespace

[PATCH 12/30] r/o bind mounts: elevate mnt_writers for unlink callers

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[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 deletio

[PATCH 15/30] r/o bind mounts: write counts for time functions

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/inode.c | 45 ++ 1 file changed, 20 insertions(+), 25 deletions

[PATCH 02/30] hppfs pass vfsmount to dentry_open()

2008-02-15 Thread Dave Hansen
leted hppfs_dentry_ops ] Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/hppfs/hppfs_kern.c | 364 ---

[PATCH 17/30] r/o bind mounts: write count for file_update_time()

2008-02-15 Thread Dave Hansen
Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/inode.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN fs/inode.c~r-o-bind-mounts-e

[PATCH 26/30] r/o bind mounts: check mnt instead of superblock directly

2008-02-15 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: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen

[PATCH 03/30] check for null vfsmount in dentry_open()

2008-02-15 Thread Dave Hansen
-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- linux-2.6.git-dave/fs/open.c | 12 1 file changed, 12 insertions(+) diff -puN fs/open.c~check-for-NULL-vfsmount-in-dentry-open fs/open.c --- linux-2.6.git/fs/open.c~check-for-NU

[PATCH 13/30] r/o bind mounts: elevate write count for xattr_permission() callers

2008-02-15 Thread Dave Hansen
This basically audits the callers of xattr_permission(), which calls permission() and can perform writes to the filesystem. Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off

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

2008-02-15 Thread Dave Hansen
On Fri, 2008-02-15 at 19:32 -0500, Theodore Tso wrote: > On Fri, Feb 15, 2008 at 02:37:30PM -0800, Dave Hansen wrote: > > > > This patch adds two function mnt_want_write() and mnt_drop_write(). > > These are used like a lock pair around and fs operations that might >

[PATCH] r/o bind mounts: stub functions

2008-02-15 Thread Dave Hansen
ete, we can actually introduce code that will safely check the counts before allowing r/w<->r/o transitions to occur. Acked-by: Serge Hallyn <[EMAIL PROTECTED]> Acked-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Mo

Re: [PATCH] page_alloc: fix the incorrect adjustment to zone->present_pages

2012-10-26 Thread Dave Hansen
On 10/26/2012 02:59 AM, Lai Jiangshan wrote: > Current free_area_init_core() has incorrect adjustment code to adjust > ->present_pages. It will cause ->present_pages overflow, make the > system unusable(can't create any process/thread in our test) and cause > further problem. > > Details: > 1) So

Re: [PATCH] mm: memmap_init_zone() performance improvement

2012-10-30 Thread Dave Hansen
On 10/20/2012 01:29 AM, Mel Gorman wrote: > I'm travelling at the moment so apologies that I have not followed up on > this. My problem is still the same with the patch - it changes more > headers than is necessary and it is sparsemem specific. At minimum, try > the suggestion of > > if (!early_p

Re: [PATCH] Kconfig.debug: Add FRAME_POINTER anti-dependency for ARC

2013-08-29 Thread Dave Hansen
On 08/27/2013 01:31 AM, Vineet Gupta wrote: > Frame pointer on ARC doesn't serve the conventional purpose of stack > unwinding due to the typical way ABI designates it's usage. > Thus it's explicit usage on ARC is discouraged (gcc is free to use it, > for some tricky stack frames even if -fomit-fra

Re: [PATCH] perf: fix interrupt handler timing harness

2013-07-08 Thread Dave Hansen
On 07/04/2013 03:30 PM, Stephane Eranian wrote: > There was an misunderstanding on the API of the do_div() > macro. It returns the remainder of the division and this > was not what the function expected leading to disabling the > interrupt latency watchdog. "Misunderstanding" is a very kind term f

Re: [PATCH] perf: fix interrupt handler timing harness

2013-07-08 Thread Dave Hansen
On 07/08/2013 11:08 AM, Stephane Eranian wrote: > I admit I have some issues with your patch and what it is trying to avoid. > There is already interrupt throttling. Your code seems to address latency > issues on the handler rather than rate issues. Yet to mitigate the latency > it is modify the th

Re: [PATCH] perf: fix interrupt handler timing harness

2013-07-08 Thread Dave Hansen
On 07/08/2013 01:20 PM, Stephane Eranian wrote: > On Mon, Jul 8, 2013 at 10:05 PM, Dave Hansen wrote: >> If the interrupts _consistently_ take too long individually they can >> starve out all the other CPU users. I saw no way to make them finish >> faster, so the only rec

[PATCH] x86: perf: fix incorrect use of do_div() in nmi warning

2013-07-08 Thread Dave Hansen
From: Dave Hansen This fixes a bug present in 3.10 and introduced here: commit 2ab00456ea8a0d79acb1390659b98416111880b2 Author: Dave Hansen Date: Fri Jun 21 08:51:35 2013 -0700 x86: Warn when NMI handlers take large amounts of time I completely botched understanding the calling

Re: [RFC PATCH 1/5] mm, page_alloc: support multiple pages allocation

2013-07-10 Thread Dave Hansen
On 07/03/2013 01:34 AM, Joonsoo Kim wrote: > - if (page) > + do { > + page = buffered_rmqueue(preferred_zone, zone, order, > + gfp_mask, migratetype); > + if (!page) > +

Re: [RFC PATCH 1/5] mm, page_alloc: support multiple pages allocation

2013-07-10 Thread Dave Hansen
On 07/10/2013 06:02 PM, Joonsoo Kim wrote: > On Wed, Jul 10, 2013 at 03:52:42PM -0700, Dave Hansen wrote: >> On 07/03/2013 01:34 AM, Joonsoo Kim wrote: >>> - if (page) >>> + do { >>> + page = buffered

Re: [RFC PATCH 1/5] mm, page_alloc: support multiple pages allocation

2013-07-11 Thread Dave Hansen
On 07/10/2013 11:12 PM, Joonsoo Kim wrote: >> > I'd also like to see some scalability numbers on this. How do your >> > tests look when all the CPUs on the system are hammering away? > What test do you mean? > Please elaborate on this more Your existing tests looked single-threaded. That's certa

Re: Yet more softlockups.

2013-07-12 Thread Dave Hansen
ut why is this even being run when I'm not running perf ? >> >> The only NMI source running should be the watchdog. > > The NMI watchdog is a perf event. > > I've Cc:-ed Dave Hansen, the author of those changes - is this a false > positive or some real problem?

Re: Yet more softlockups.

2013-07-12 Thread Dave Hansen
On 07/12/2013 08:45 AM, Dave Jones wrote: > On Fri, Jul 12, 2013 at 08:38:52AM -0700, Dave Hansen wrote: > > Dave, for your case, my suspicion would be that it got turned on > > inadvertently, or that we somehow have a bug which bumped up > > perf_event.c's 'a

Re: [PATCH] x86: perf: fix incorrect use of do_div() in nmi warning

2013-07-12 Thread Dave Hansen
On 07/12/2013 05:08 AM, Ingo Molnar wrote: >> > Note, there was a second fix posted by Stephane Eranian for >> > a separate patch which I also botched: >> > >> >http://lkml.kernel.org/r/20130704223010.GA30625@quad >> > >> > Both of these fixes need to get pulled in to Linus's tree and >> > th

Re: [RFC PATCH 1/5] mm, page_alloc: support multiple pages allocation

2013-07-12 Thread Dave Hansen
On 07/10/2013 11:12 PM, Joonsoo Kim wrote: > On Wed, Jul 10, 2013 at 10:38:20PM -0700, Dave Hansen wrote: >> You're probably right for small numbers of pages. But, if we're talking >> about things that are more than, say, 100 pages (isn't the pcp batch >> size

Re: Yet more softlockups.

2013-07-12 Thread Dave Hansen
On 07/12/2013 11:07 AM, David Ahern wrote: > And Dave Hansen: I think nmi.c has the same do_div problem as > kernel/events/core.c that Stephane fixed. Your patch has: > > whole_msecs = do_div(delta, (1000 * 1000)); > decimal_msecs = do_div(delta, 1000) % 1000; Yup

Re: Yet more softlockups.

2013-07-12 Thread Dave Hansen
I added the WARN_ONCE() the first time we enable a perf event: The watchdog code looks to use perf these days: > [1.003260] [ cut here ] > [1.007943] WARNING: at > /home/davehans/linux.git/arch/x86/kernel/cpu/perf_event.c:471 > x86_pmu_event_init+0x249/0x430() >

Re: [PATCH 8/9] mm: implement split page table lock for PMD level

2013-09-13 Thread Dave Hansen
On 09/13/2013 06:06 AM, Kirill A. Shutemov wrote: > +config ARCH_ENABLE_SPLIT_PMD_PTLOCK > + boolean > + > +config SPLIT_PMD_PTLOCK_CPUS > + int > + # hugetlb hasn't converted to split locking yet > + default "99" if HUGETLB_PAGE > + default "32" if ARCH_ENABLE_SPLIT_PMD_PTL

Re: [PATCH 2/2 v2] mm: allow to set overcommit ratio more precisely

2013-09-05 Thread Dave Hansen
On 09/05/2013 05:51 AM, Jerome Marchand wrote: > This patch adds the new overcommit_ratio_ppm sysctl variable that > allow to set overcommit ratio with a part per million precision. > The old overcommit_ratio variable can still be used to set and read > the ratio with a 1% precision. That way, over

[RFC][PATCH] mm: percpu pages: up batch size to fix arithmetic?? errror

2013-09-11 Thread Dave Hansen
I really don't know where the: batch /= 4; /* We effectively *= 4 below */ ... batch = rounddown_pow_of_two(batch + batch/2) - 1; came from. The round down code at *MOST* does a *= 1.5, but *averages* out to be just under 1. On a system with 128GB in a zone,

Re: [RFC][PATCH] mm: percpu pages: up batch size to fix arithmetic?? errror

2013-09-11 Thread Dave Hansen
On 09/11/2013 04:08 PM, Cody P Schafer wrote: > So we have this variable called "batch", and the code is trying to store > the _average_ number of pcp pages we want into it (not the batchsize), > and then we divide our "average" goal by 4 to get a batchsize. All the > comments refer to the size of

Re: [RFC][PATCH] mm: percpu pages: up batch size to fix arithmetic?? errror

2013-09-11 Thread Dave Hansen
BTW, in my little test, the median ->count was 10, and the mean was 45. On 09/11/2013 04:21 PM, Cody P Schafer wrote: > Also, we may want to consider shrinking pcp->high down from 6*pcp->batch > given that the original "6*" choice was based upon ->batch actually > being 1/4th of the average pagese

  1   2   3   4   5   6   7   8   9   10   >