Re: e1000e + suspend, 3.9-rc2

2013-03-19 Thread Konstantin Khlebnikov
Jiri Slaby wrote: On 03/12/2013 06:17 PM, Borislav Petkov wrote: On Mon, Mar 11, 2013 at 09:25:37PM +0100, Borislav Petkov wrote: Yeah, it is already upstream. And yeah, it did trigger with it. $ git describe v3.9-rc2-112-g7c6baa304b84 But it somehow doesn't trigger with that same kernel anym

[PATCH] kconfig: print each first level disjunction block from a new line

2013-03-21 Thread Konstantin Khlebnikov
|| C && CC && CCC Modules' config options usually comes first in these blocks. Signed-off-by: Konstantin Khlebnikov Cc: Andrew Morton Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org --- scripts/kconfig/expr.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions

[PATCH RFC 1/5] kconfig: implement weak reverse-dependencies

2013-03-21 Thread Konstantin Khlebnikov
his method allows to implement optional dependencies without introducing new kconfig symbol for each pair of connected kconfig options. Signed-off-by: Konstantin Khlebnikov Cc: Andrew Morton Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org --- Documentation/kbuild/kconfig-language.txt |6

[PATCH RFC 5/5] e1000e: make PTP clock optional

2013-03-21 Thread Konstantin Khlebnikov
As proof of concept for new approach in managing cross-module dependencies this patch resolves hard depencency between CONFIG_E1000E and CONFIG_PTP_1588_CLOCK. Signed-off-by: Konstantin Khlebnikov Cc: Richard Cochran --- drivers/net/ethernet/intel/Kconfig |2 +- drivers/net

[PATCH RFC 3/5] kconfig: simplity linking cross-module glue objects

2013-03-21 Thread Konstantin Khlebnikov
module-A is available. Objects from module_b-m will be linked only if CONFIG_MODULE_B=m. Signed-off-by: Konstantin Khlebnikov Cc: Andrew Morton Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org --- Documentation/kbuild/makefiles.txt | 14 ++ scripts/Makefile.build | 16

[PATCH RFC 4/5] ptp: add stub function for ptp_clock_index()

2013-03-21 Thread Konstantin Khlebnikov
After this patch function ptp_clock_index(struct ptp_clock *ptp) returns -1 if ptp is NULL or CONFIG_PTP_1588_CLOCK disabled. Signed-off-by: Konstantin Khlebnikov Cc: Richard Cochran --- drivers/net/ethernet/broadcom/tg3.c |5 + drivers/net/ethernet/freescale/fec.c

Re: [PATCH RFC 1/5] kconfig: implement weak reverse-dependencies

2013-03-21 Thread Konstantin Khlebnikov
Richard Cochran wrote: On Thu, Mar 21, 2013 at 12:22:57PM +0400, Konstantin Khlebnikov wrote: This patch adds new kind of dependencies between kconfig symbols, and new kconfig keyword 'apply' for them. 'apply' works mostly like 'select', but it allows to disa

Re: [PATCH 3/5] PCI: revert preparing for wakeup in runtime-suspend finalization

2013-02-03 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Saturday, February 02, 2013 09:58:45 PM Rafael J. Wysocki wrote: On Saturday, February 02, 2013 04:12:03 PM Konstantin Khlebnikov wrote: Rafael J. Wysocki wrote: On Tuesday, January 29, 2013 12:55:15 PM Rafael J. Wysocki wrote: On Tuesday, January 29, 2013 11:04

[PATCH v2 3/7] PCI: catch enable-counter underflows

2013-02-04 Thread Konstantin Khlebnikov
This patch adds single WARN_ONCE() check for catching 'enable_cnt' imbalances. Signed-off-by: Konstantin Khlebnikov Cc: linux-...@vger.kernel.org Cc: Bjorn Helgaas Cc: Rafael J. Wysocki --- drivers/pci/pci.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c

[PATCH v2 5/7] e1000e: fix runtime power management transitions

2013-02-04 Thread Konstantin Khlebnikov
like custom 'enable_wakeup' sign. Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- drivers/net/ethernet/intel/e1000e/netdev.c | 78 ++-- 1 file changed, 18 insertions(+), 60

[PATCH v2 7/7] e1000e: fix accessing to suspended device

2013-02-04 Thread Konstantin Khlebnikov
This patch fixes some annoying messages like 'Error reading PHY register' and 'Hardware Erorr' and saves several seconds on reboot. Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- driver

[PATCH v2 6/7] PCI/PM: warn about incomplete actions in ->runtime_suspend() callback

2013-02-04 Thread Konstantin Khlebnikov
n saved by ->runtime_suspend() that means device alredy prepared for wakeup and probably no longer accessible. Thus driver must either do all actions or leave all these tasks to PCI subsystem. Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: Bjorn Helgaas Cc: linux-...@vger.

[PATCH v2 4/7] PCI/PM: clear state_saved during suspend

2013-02-04 Thread Konstantin Khlebnikov
. Signed-off-by: Konstantin Khlebnikov # add comment Cc: linux-...@vger.kernel.org Cc: Bjorn Helgaas Cc: Rafael J. Wysocki --- drivers/pci/pci-driver.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index dc5bdce..f9aa311 100

[PATCH v2 2/7] PCI: don't touch enable_cnt in pci_device_shutdown()

2013-02-04 Thread Konstantin Khlebnikov
em. Probably we should leave here only warning and disable bus-mastering for each driver individually in ->shutdown() callback. Link: https://lkml.org/lkml/2012/6/6/278 Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: Bjorn Helgaas Cc: Khalid Aziz Cc: linux-...@vger.kernel.org C

[PATCH v2 0/7] pci/e1000e: return runtime-pm back to work

2013-02-04 Thread Konstantin Khlebnikov
/147 --- Konstantin Khlebnikov (6): e1000e: fix pci-device enable-counter balance PCI: don't touch enable_cnt in pci_device_shutdown() PCI: catch enable-counter underflows e1000e: fix runtime power management transitions PCI/PM: warn about incomplete actio

[PATCH v2 1/7] e1000e: fix pci-device enable-counter balance

2013-02-04 Thread Konstantin Khlebnikov
me PM support (rev. 4)") in v2.6.35 Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- drivers/net/ethernet/intel/e1000e/netdev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ne

Re: [patch] mm: shmem: use new radix tree iterator

2013-02-04 Thread Konstantin Khlebnikov
Hugh Dickins wrote: On Sat, 2 Feb 2013, Konstantin Khlebnikov wrote: Johannes Weiner wrote: In shmem_find_get_pages_and_swap, use the faster radix tree iterator construct from 78c1d78 "radix-tree: introduce bit-optimized iterator". Signed-off-by: Johannes Weiner Hmm, ACK. shmem_u

Re: [PATCH v2 6/7] PCI/PM: warn about incomplete actions in ->runtime_suspend() callback

2013-02-04 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Monday, February 04, 2013 03:56:12 PM Konstantin Khlebnikov wrote: Documentation/power/pci.txt says: | It is expected that the device driver's pm->runtime_suspend() callback will | not attempt to prepare the device for signaling wakeup or to put it into a | l

Re: [PATCH 1/5] e1000e: fix resuming from runtime-suspend

2013-01-28 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Monday, January 28, 2013 04:05:33 PM Bjorn Helgaas wrote: [+cc Rafael, author of patch you cited] On Fri, Jan 18, 2013 at 4:42 AM, Konstantin Khlebnikov wrote: Bug was introduced in commit 23606cf5d1192c2b17912cb2ef6e62f9b11de133 ("e1000e / PCI / PM: Add

Re: [PATCH 2/5] e1000e: fix pci device enable counter balance

2013-01-28 Thread Konstantin Khlebnikov
Bjorn Helgaas wrote: [+cc Rafael @sisk.pl] On Mon, Jan 28, 2013 at 4:09 PM, Bjorn Helgaas wrote: [+cc Rafael] On Fri, Jan 18, 2013 at 4:42 AM, Konstantin Khlebnikov wrote: __e1000_shutdown() calls pci_disable_device() at the end, thus __e1000_resume() should call pci_enable_device_mem

Re: [PATCH 3/5] PCI: revert preparing for wakeup in runtime-suspend finalization

2013-01-28 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Monday, January 28, 2013 04:17:42 PM Bjorn Helgaas wrote: [+cc Rafael] On Fri, Jan 18, 2013 at 4:42 AM, Konstantin Khlebnikov wrote: This patch effectively reverts commit 42eca2302146fed51335b95128e949ee6f54478f ("PCI: Don't touch card regs after runti

Re: [PATCH 1/5] e1000e: fix resuming from runtime-suspend

2013-01-30 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Tuesday, January 29, 2013 10:32:14 AM Konstantin Khlebnikov wrote: Rafael J. Wysocki wrote: On Monday, January 28, 2013 04:05:33 PM Bjorn Helgaas wrote: [+cc Rafael, author of patch you cited] On Fri, Jan 18, 2013 at 4:42 AM, Konstantin Khlebnikov wrote: Bug

Re: [patch] mm: shmem: use new radix tree iterator

2013-02-02 Thread Konstantin Khlebnikov
Johannes Weiner wrote: In shmem_find_get_pages_and_swap, use the faster radix tree iterator construct from 78c1d78 "radix-tree: introduce bit-optimized iterator". Signed-off-by: Johannes Weiner Hmm, ACK. shmem_unuse_inode() also can be redone in this way. I did something similar year ago: http

Re: [PATCH 3/5] PCI: revert preparing for wakeup in runtime-suspend finalization

2013-02-02 Thread Konstantin Khlebnikov
Rafael J. Wysocki wrote: On Tuesday, January 29, 2013 12:55:15 PM Rafael J. Wysocki wrote: On Tuesday, January 29, 2013 11:04:57 AM Konstantin Khlebnikov wrote: Rafael J. Wysocki wrote: On Monday, January 28, 2013 04:17:42 PM Bjorn Helgaas wrote: [+cc Rafael] On Fri, Jan 18, 2013 at 4:42 AM

[PATCH] workqueue: un-GPL function delayed_work_timer_fn()

2013-01-24 Thread Konstantin Khlebnikov
. For example schedule_delayed_work() available for non-GPL. Signed-off-by: Konstantin Khlebnikov Cc: Tejun Heo Cc: sta...@vger.kernel.org # 3.7 --- kernel/workqueue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index fbc6576..0

[PATCH RESEND 0/3] e1000e: return runtime-pm back to work

2013-02-24 Thread Konstantin Khlebnikov
here some fixes for e1000e driver from: https://lkml.org/lkml/2013/2/4/185 The rest patches from that patchset already committed. --- Konstantin Khlebnikov (3): e1000e: fix pci-device enable-counter balance e1000e: fix runtime power management transitions e1000e: fix accessing

[PATCH RESEND 1/3] e1000e: fix pci-device enable-counter balance

2013-02-24 Thread Konstantin Khlebnikov
me PM support (rev. 4)") in v2.6.35 Signed-off-by: Konstantin Khlebnikov Acked-by: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- drivers/net/ethernet/intel/e1000e/netdev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH RESEND 2/3] e1000e: fix runtime power management transitions

2013-02-24 Thread Konstantin Khlebnikov
like custom 'enable_wakeup' sign. Signed-off-by: Konstantin Khlebnikov Acked-by: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- drivers/net/ethernet/intel/e1000e/netdev.c | 78 ++-- 1 file changed, 18 inserti

[PATCH RESEND 3/3] e1000e: fix accessing to suspended device

2013-02-24 Thread Konstantin Khlebnikov
This patch fixes some annoying messages like 'Error reading PHY register' and 'Hardware Erorr' and saves several seconds on reboot. Signed-off-by: Konstantin Khlebnikov Acked-by: Rafael J. Wysocki Cc: e1000-de...@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan ---

Re: [E1000-devel] [PATCH RESEND 3/3] e1000e: fix accessing to suspended device

2013-02-26 Thread Konstantin Khlebnikov
Waskiewicz Jr, Peter P wrote: On 2/24/2013 9:19 PM, Konstantin Khlebnikov wrote: This patch fixes some annoying messages like 'Error reading PHY register' and 'Hardware Erorr' and saves several seconds on reboot. Any networking-related patches should also include ne

Re: [ 069/100] e1000e: fix pci-device enable-counter balance

2013-03-13 Thread Konstantin Khlebnikov
: Konstantin Khlebnikov commit 4e0855dff094b0d56d6b5b271e0ce7851cc1e063 upstream. This patch removes redundant and unbalanced pci_disable_device() from __e1000_shutdown(). pci_clear_master() is enough, device can go into suspended state with elevated enable_cnt. Bug was introduced in commit

Re: [ 069/100] e1000e: fix pci-device enable-counter balance

2013-03-13 Thread Konstantin Khlebnikov
Konstantin Khlebnikov wrote: Greg Kroah-Hartman wrote: 3.8-stable review patch. If anyone has any objections, please let me know. Vivek Goyal reported about problem caused by this improper fix. https://lkml.org/lkml/2013/3/12/529 (this patch also pending to 3.0-stable and 3.4-stable

Re: 3.9.0-rc1: kexec not working: root disk does not show up

2013-03-13 Thread Konstantin Khlebnikov
Vivek Goyal wrote: On Wed, Mar 13, 2013 at 11:46:29AM +0400, Konstantin Khlebnikov wrote: [..] Ok, some more observation. - Problem seems to be in during shutdown path. Because older kernel 3.8 can kexec into newer kernel 3.9.rc1 but not vice-a-versa. I did git bisecting and following

Re: 3.9.0-rc1: kexec not working: root disk does not show up

2013-03-14 Thread Konstantin Khlebnikov
Vivek Goyal wrote: On Wed, Mar 13, 2013 at 06:53:16PM +0400, Konstantin Khlebnikov wrote: [..] PCI: Don't try to disable Bus Master on disconnected PCI devices From: Konstantin Khlebnikov This is fix for commit 7897e6022761ace7377f0f784fca059da55f5d71 from v3.9-rc1 ("PCI: Disable

[PATCH bugfix 3.9] PCI: Don't try to disable Bus Master on disconnected PCI devices

2013-03-14 Thread Konstantin Khlebnikov
uot;) Unfortunately fixing one bug uncovers another: ->shutdown() callback might switch device to deep sleep state. PCI config space no longer available after that. Link: https://lkml.org/lkml/2013/3/12/529 Signed-off-by: Konstantin Khlebnikov Reported-and-Tested-by: Vivek Goyal Cc: Bjorn Helgaas

Re: [PATCH RFC] mm/swap: automatic tuning for swapin readahead

2012-10-02 Thread Konstantin Khlebnikov
ers) Hugh Dickins wrote: Shaohua, Konstantin, Sorry that it takes me so long to to reply on these swapin readahead bounding threads, but I had to try some things out before jumping in, and only found time to experiment last week. On Thu, 6 Sep 2012, Konstantin Khlebnikov wrote: This patch a

Re: [PATCH RFC] mm/swap: automatic tuning for swapin readahead

2012-10-04 Thread Konstantin Khlebnikov
2012, Konstantin Khlebnikov wrote: Hugh Dickins wrote: If I boot with mem=900M (and 1G swap: either on hard disk sda, or on Vertex II SSD sdb), and mmap anonymous 1000M (either MAP_PRIVATE, or MAP_SHARED for a shmem object), and either cycle sequentially round that making 5M touches (spaced a

[PATCH v3 00/10] mm: vma->vm_flags diet

2012-07-31 Thread Konstantin Khlebnikov
This patchset kills some VM_* flags in vma->vm_flags, as result there appears five free bits. Changes since v2 [ https://lkml.org/lkml/2012/4/7/67 ] * killing VM_EXECUTABLE combined back into single patch * new (the biggest one) patch which kills VM_RESERVED --- Konstantin Khlebnikov

[PATCH v3 01/10] x86, pat: remove the dependency on 'vm_pgoff' in track/untrack pfn vma routines

2012-07-31 Thread Konstantin Khlebnikov
lebni...@openvz.org: Clear pfn to paddr conversion] Signed-off-by: Suresh Siddha Signed-off-by: Konstantin Khlebnikov Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c | 33 +++-- 1 file changed, 19 insertions(+), 14 delet

[PATCH v3 02/10] x86, pat: separate the pfn attribute tracking for remap_pfn_range and vm_insert_pfn

2012-07-31 Thread Konstantin Khlebnikov
ip of setting PAT specific vm_flag in the 'vma'. [khlebni...@openvz.org: Clear checks in track_pfn_remap()] Signed-off-by: Suresh Siddha Signed-off-by: Konstantin Khlebnikov Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c

[PATCH v3 03/10] mm, x86, pat: rework linear pfn-mmap tracking

2012-07-31 Thread Konstantin Khlebnikov
Reset the VM_PAT flag as part of untrack_pfn_vma()] Signed-off-by: Konstantin Khlebnikov Signed-off-by: Suresh Siddha Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c | 17 - include/asm-generic/pgtabl

[PATCH v3 04/10] mm: introduce arch-specific vma flag VM_ARCH_1

2012-07-31 Thread Konstantin Khlebnikov
- VM_ARCH_1 - - And voila! One completely free bit. Signed-off-by: Konstantin Khlebnikov --- include/linux/mm.h | 34 +- mm/huge_memory.c |2 +- mm/ksm.c |7 ++- 3 files changed, 28 insertions(+), 15 deletions

[PATCH v3 05/10] mm: kill vma flag VM_INSERTPAGE

2012-07-31 Thread Konstantin Khlebnikov
map() handler under mm->mmap_sem write-lock, so it able to change vma->vm_flags. Caller must set VM_MIXEDMAP at mmap time if it wants to call this function from other places, for example from page-fault handler. Signed-off-by: Konstantin Khlebnikov Cc: Peter Zijlstra Cc: Nick Piggin Cc: Car

[PATCH v3 06/10] mm: kill vma flag VM_CAN_NONLINEAR

2012-07-31 Thread Konstantin Khlebnikov
his method and obtain nonlinear vma support. Signed-off-by: Konstantin Khlebnikov Cc: Alexander Viro Cc: Nick Piggin Cc: Ingo Molnar --- drivers/staging/android/ashmem.c |1 - fs/9p/vfs_file.c |1 + fs/btrfs/file.c |2 +- fs/ceph/add

[PATCH v3 07/10] mm: use mm->exe_file instead of first VM_EXECUTABLE vma->vm_file

2012-07-31 Thread Konstantin Khlebnikov
Some security modules and oprofile still uses VM_EXECUTABLE for retrieving task's executable file, after this patch they will use mm->exe_file directly. mm->exe_file protected with mm->mmap_sem, so locking stays the same. Signed-off-by: Konstantin Khlebnikov Acked-by: Chris Metcalf

[PATCH v3 09/10] mm: prepare VM_DONTDUMP for using in drivers

2012-07-31 Thread Konstantin Khlebnikov
mappings VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) Signed-off-by: Konstantin Khlebnikov Cc: Jason Baron Cc: Nick Piggin Cc: Hugh Dickins --- fs/binfmt_elf.c|2 +- include/linux/mm.h |2 +- mm/madvise.c |8 ++-- 3 files changed, 8 insertions(+), 4

[PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter

2012-07-31 Thread Konstantin Khlebnikov
userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. Signed-off-by: Konstantin

[PATCH v3 08/10] mm: kill vma flag VM_EXECUTABLE and mm->num_exe_file_vmas

2012-07-31 Thread Konstantin Khlebnikov
. We can try to remove this logic and keep mm->exe_file until final mmput(). mm->exe_file is still protected with mm->mmap_sem, because we want to change it via new sys_prctl(PR_SET_MM_EXE_FILE). Also via this syscall task can change its mm->exe_file and unpin mountpoint explicitly. Si

[PATCH RESEND v3 00/10] mm: vma->vm_flags diet

2012-07-31 Thread Konstantin Khlebnikov
one) patch which kills VM_RESERVED --- Konstantin Khlebnikov (8): mm, x86, pat: rework linear pfn-mmap tracking mm: introduce arch-specific vma flag VM_ARCH_1 mm: kill vma flag VM_INSERTPAGE mm: kill vma flag VM_CAN_NONLINEAR mm: use mm->exe_file instead of first VM_EXEC

[PATCH v3 01/10] x86, pat: remove the dependency on 'vm_pgoff' in track/untrack pfn vma routines

2012-07-31 Thread Konstantin Khlebnikov
lebni...@openvz.org: Clear pfn to paddr conversion] Signed-off-by: Suresh Siddha Signed-off-by: Konstantin Khlebnikov Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c | 33 +++-- 1 file changed, 19 insertions(+), 14 delet

[PATCH v3 02/10] x86, pat: separate the pfn attribute tracking for remap_pfn_range and vm_insert_pfn

2012-07-31 Thread Konstantin Khlebnikov
ip of setting PAT specific vm_flag in the 'vma'. [khlebni...@openvz.org: Clear checks in track_pfn_remap()] Signed-off-by: Suresh Siddha Signed-off-by: Konstantin Khlebnikov Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c

[PATCH v3 04/10] mm: introduce arch-specific vma flag VM_ARCH_1

2012-07-31 Thread Konstantin Khlebnikov
- VM_ARCH_1 - - And voila! One completely free bit. Signed-off-by: Konstantin Khlebnikov --- include/linux/mm.h | 34 +- mm/huge_memory.c |2 +- mm/ksm.c |7 ++- 3 files changed, 28 insertions(+), 15 deletions

[PATCH v3 06/10] mm: kill vma flag VM_CAN_NONLINEAR

2012-07-31 Thread Konstantin Khlebnikov
his method and obtain nonlinear vma support. Signed-off-by: Konstantin Khlebnikov Cc: Alexander Viro Cc: Nick Piggin Cc: Ingo Molnar --- drivers/staging/android/ashmem.c |1 - fs/9p/vfs_file.c |1 + fs/btrfs/file.c |2 +- fs/ceph/add

[PATCH v3 07/10] mm: use mm->exe_file instead of first VM_EXECUTABLE vma->vm_file

2012-07-31 Thread Konstantin Khlebnikov
Some security modules and oprofile still uses VM_EXECUTABLE for retrieving task's executable file, after this patch they will use mm->exe_file directly. mm->exe_file protected with mm->mmap_sem, so locking stays the same. Signed-off-by: Konstantin Khlebnikov Acked-by: Chris Metcalf

[PATCH v3 08/10] mm: kill vma flag VM_EXECUTABLE and mm->num_exe_file_vmas

2012-07-31 Thread Konstantin Khlebnikov
. We can try to remove this logic and keep mm->exe_file until final mmput(). mm->exe_file is still protected with mm->mmap_sem, because we want to change it via new sys_prctl(PR_SET_MM_EXE_FILE). Also via this syscall task can change its mm->exe_file and unpin mountpoint explicitly. Si

[PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter

2012-07-31 Thread Konstantin Khlebnikov
userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. Signed-off-by: Konstantin

[PATCH v3 09/10] mm: prepare VM_DONTDUMP for using in drivers

2012-07-31 Thread Konstantin Khlebnikov
mappings VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) Signed-off-by: Konstantin Khlebnikov Cc: Jason Baron Cc: Nick Piggin Cc: Hugh Dickins --- fs/binfmt_elf.c|2 +- include/linux/mm.h |2 +- mm/madvise.c |8 ++-- 3 files changed, 8 insertions(+), 4

[PATCH v3 05/10] mm: kill vma flag VM_INSERTPAGE

2012-07-31 Thread Konstantin Khlebnikov
map() handler under mm->mmap_sem write-lock, so it able to change vma->vm_flags. Caller must set VM_MIXEDMAP at mmap time if it wants to call this function from other places, for example from page-fault handler. Signed-off-by: Konstantin Khlebnikov Cc: Peter Zijlstra Cc: Nick Piggin Cc: Car

[PATCH v3 03/10] mm, x86, pat: rework linear pfn-mmap tracking

2012-07-31 Thread Konstantin Khlebnikov
Reset the VM_PAT flag as part of untrack_pfn_vma()] Signed-off-by: Konstantin Khlebnikov Signed-off-by: Suresh Siddha Cc: Venkatesh Pallipadi Cc: H. Peter Anvin Cc: Nick Piggin Cc: Ingo Molnar --- arch/x86/mm/pat.c | 17 - include/asm-generic/pgtabl

[bug report x86] test_nx.ko is broken

2012-09-26 Thread Konstantin Khlebnikov
test_nx.ko incompatible with x86 relative exception table, which was added in commit 706276543b699d80f546e45f8b12574e7b18d952 also it conflicts with CONFIG_DEBUG_SET_MODULE_RONX=y, because it wants to modify write-protected data. -- To unsubscribe from this list: send the line "unsubscribe linux-

[PATCH] drivers/net: igb: release rtnl_lock on error path

2013-07-08 Thread Konstantin Khlebnikov
This adds missing rtnl_unlock() Signed-off-by: Konstantin Khlebnikov Cc: Jeff Kirsher Cc: e1000-de...@lists.sourceforge.net --- drivers/net/ethernet/intel/igb/igb_main.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet

[PATCH] drivers/net: caif: fix wrong rtnl_is_locked() usage

2013-07-08 Thread Konstantin Khlebnikov
work which releases these devices. Also this patch fixes calling dev_close/unregister_netdevice without rtnl_lock from caif_ser_exit(). Signed-off-by: Konstantin Khlebnikov Cc: Dmitry Tarnyagin --- drivers/net/caif/caif_serial.c | 61 ++-- 1 file changed, 39

[PATCH] drivers/net: enic: release rtnl_lock on error-path

2013-07-08 Thread Konstantin Khlebnikov
enic_change_mtu_work() must call rtnl_unlock() on all exiting paths. Signed-off-by: Konstantin Khlebnikov Cc: Christian Benvenuti Cc: Roopa Prabhu Cc: Neel Patel Cc: Nishank Trivedi --- drivers/net/ethernet/cisco/enic/enic_main.c |2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 3/5] hugetlbfs: remove cancel_dirty_page() from truncate_huge_page()

2013-07-08 Thread Konstantin Khlebnikov
There is no backend and writeback, dirty pages accounting is disabled. ClearPageDirty() more suits for this place. Signed-off-by: Konstantin Khlebnikov Cc: Nadia Yvette Chambers --- fs/hugetlbfs/inode.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hugetlbfs/inode.c

[PATCH 4/5] page_writeback: get rid of account_size argument in cancel_dirty_page()

2013-07-08 Thread Konstantin Khlebnikov
Dirty pages accounting always works with PAGE_CACHE_SIZE granularity. Signed-off-by: Konstantin Khlebnikov --- fs/buffer.c|2 +- include/linux/page-flags.h |2 +- mm/truncate.c |7 +++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs

[PATCH 2/5] nfs: remove redundant cancel_dirty_page() from nfs_wb_page_cancel()

2013-07-08 Thread Konstantin Khlebnikov
ak with ext3 data=journal"). Signed-off-by: Konstantin Khlebnikov Cc: linux-...@vger.kernel.org --- fs/nfs/write.c |5 - 1 file changed, 5 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index a2c7c28..737981f 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1735,11 +17

[PATCH 1/5] mm: remove redundant dirty pages check from __delete_from_page_cache()

2013-07-08 Thread Konstantin Khlebnikov
ge_cache() and __delete_from_page_cache() handle dirty pages themselves. I have run xfstest on ext3 in mode data=journal several times. Everything works fine, except testcase '068' which have triggered deadlock on fs-freeze. This seems unrelated and probably it's never worked for

[PATCH 5/5] page_writeback: put account_page_redirty() after set_page_dirty()

2013-07-08 Thread Konstantin Khlebnikov
rns true because this page is locked and all ptes are write-protected by previously called clear_page_dirty_for_io(). Thus nobody can mark it dirty except current task. This prevents multy-threaded scenarios of taks->nr_dirtied underflows. Signed-off-by: Konstantin Khlebnikov --- fs/btrfs/exten

[PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-08 Thread Konstantin Khlebnikov
_page() from truncate_huge_page() b720923 nfs: remove redundant cancel_dirty_page() from nfs_wb_page_cancel() 4c21e52 mm: remove redundant dirty pages check from __delete_from_page_cache() Signed-off-by: Konstantin Khlebnikov Cc: cgro...@vger.kernel.org Cc: de...@openvz.org Cc: Michal Hocko Cc: Sha Zh

[PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-08 Thread Konstantin Khlebnikov
ncel_dirty_page() from truncate_huge_page() b720923 nfs: remove redundant cancel_dirty_page() from nfs_wb_page_cancel() 4c21e52 mm: remove redundant dirty pages check from __delete_from_page_cache() Signed-off-by: Konstantin Khlebnikov Cc: cgro...@vger.kernel.org Cc: de...@openvz.org Cc: Michal Hocko C

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Tejun Heo wrote: Hello, Vivek. On Mon, Jul 08, 2013 at 01:52:01PM -0400, Vivek Goyal wrote: Again, a problem to be fixed in the stack rather than patching up from up above. The right thing to do is to propagate pressure through bdi properly and let whatever is backing the bdi generate appropri

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Tejun Heo wrote: Hello, On Tue, Jul 09, 2013 at 12:28:15PM +0400, Konstantin Khlebnikov wrote: Yep, blkio has plenty problems and flaws and I don't get how it's related to vfs layer, dirty set control and non-disk or network backed filesystems. Any problem can be fixed by intro

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Tejun Heo wrote: On Tue, Jul 09, 2013 at 06:16:05AM -0700, Tejun Heo wrote: On Tue, Jul 09, 2013 at 05:15:14PM +0400, Konstantin Khlebnikov wrote: blkio controls block devices. not filesystems or superblocks or bdi or pagecache. It's all about block layer and nothing more. Am I right

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Tejun Heo wrote: On Tue, Jul 09, 2013 at 05:43:10PM +0400, Konstantin Khlebnikov wrote: My concept it cgroup which would control io operation on vfs layer for all filesystems. It will account and manage IO operations. I've found really lightweight technique for accounting and throttling

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Theodore Ts'o wrote: Another major problem with this concept is that it lumps all I/O's into a single cgroup. So I/O's from pseudo filesystems (such as reading from /sys/kernel/debug/tracing/trace_pipe), networked file systems such as NFS, and I/O to various different block devices all get count

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Vivek Goyal wrote: On Tue, Jul 09, 2013 at 06:35:54PM +0400, Konstantin Khlebnikov wrote: [..] I'm not interested in QoS or proportional control. Let schedulers do it. I want just bandwidth control. I don't want to write a new scheduler or extend some of existing one. I want implem

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Vivek Goyal wrote: On Tue, Jul 09, 2013 at 09:42:57PM +0400, Konstantin Khlebnikov wrote: [..] So what kind of priority inversion you are facing with blkcg and how would you avoid it with your implementation? I know that serialization can happen at filesystem level while trying to commit

Re: [PATCH RFC] fsio: filesystem io accounting cgroup

2013-07-09 Thread Konstantin Khlebnikov
Sha Zhengju wrote: Hi, On Mon, Jul 8, 2013 at 5:59 PM, Konstantin Khlebnikov wrote: > This is proof of concept, just basic functionality for IO controller. > This cgroup will control filesystem usage on vfs layer, it's main goal is > bandwidth control. It's suppo

[PATCH 2/2] X.509: add module description and license

2013-09-17 Thread Konstantin Khlebnikov
This patch fixes lack of license, otherwise x509_key_parser.ko taints kernel. Signed-off-by: Konstantin Khlebnikov --- crypto/asymmetric_keys/x509_public_key.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys

[PATCH 1/2] MPILIB: add module description and license

2013-09-17 Thread Konstantin Khlebnikov
This patch fixes lack of license, otherwise mpi.ko taints kernel. Signed-off-by: Konstantin Khlebnikov --- lib/mpi/mpiutil.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mpi/mpiutil.c b/lib/mpi/mpiutil.c index 657979f..bf076d2 100644 --- a/lib/mpi/mpiutil.c +++ b/lib/mpi

[PATCH] audit: fix endless wait in audit_log_start()

2013-09-18 Thread Konstantin Khlebnikov
After commit 829199197a430dade2519d54f5545c4a094393b8 audit emiters will block forever if userspace daemon cannot handle backlog. After the timeout waiting loop turns into busy loop and runs until daemon dies or returns back to work. This is minimal patch for that bug. Signed-off-by: Konstantin

Re: mm: gpf in find_vma

2013-09-07 Thread Konstantin Khlebnikov
Sasha Levin wrote: Hi all, While fuzzing with trinity inside a KVM tools guest, running latest -next kernel, I've stumbled on the following: [13600.008029] general protection fault: [#1] PREEMPT SMP DEBUG_PAGEALLOC [13600.010235] Modules linked in: [13600.010742] CPU: 30 PID: 26329 Comm:

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-09 Thread Konstantin Khlebnikov
Luiz Capitulino wrote: I'm getting the following soft lockup: CPU: 6 PID: 2278 Comm: killall5 Tainted: GF3.11.0-rc7+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 0099 88011fd83de8 815324df 2800 817d48f9 88011fd83e68

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-09 Thread Konstantin Khlebnikov
Luiz Capitulino wrote: On Mon, 09 Sep 2013 18:32:13 +0400 Konstantin Khlebnikov wrote: Luiz Capitulino wrote: I'm getting the following soft lockup: CPU: 6 PID: 2278 Comm: killall5 Tainted: GF3.11.0-rc7+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 000

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-09 Thread Konstantin Khlebnikov
Luiz Capitulino wrote: On Mon, 09 Sep 2013 19:19:14 +0400 Konstantin Khlebnikov wrote: Luiz Capitulino wrote: On Mon, 09 Sep 2013 18:32:13 +0400 Konstantin Khlebnikov wrote: Luiz Capitulino wrote: I'm getting the following soft lockup: CPU: 6 PID: 2278 Comm: killall5 Tainte

[PATCH] shmem: fix double memory uncharge on error path

2013-09-12 Thread Konstantin Khlebnikov
This patch removes erroneous call of shmem_unacct_size() from error path. Shmem inode will release that memory reservation in shmem_evict_inode(). So, if following call of alloc_file fails we'll free reservation twice. Signed-off-by: Konstantin Khlebnikov --- mm/shmem.c |8 1

[PATCH] shmem: fixup memory reservation during truncating

2013-09-13 Thread Konstantin Khlebnikov
r() during truncating. Signed-off-by: Konstantin Khlebnikov --- mm/shmem.c | 17 + 1 file changed, 17 insertions(+) diff --git a/mm/shmem.c b/mm/shmem.c index ff08920..a15c8dd 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -148,6 +148,19 @@ static inline void shmem_unacct_size(unsigned

[PATCH] mm: catch memory commitment underflow

2013-09-13 Thread Konstantin Khlebnikov
This adds debug for vm_committed_as under CONFIG_DEBUG_VM=y Signed-off-by: Konstantin Khlebnikov --- mm/mmap.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 9d54851..2c7e6aa 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -131,6 +131,12 @@ int

[PATCH RFC] mm/swap: automatic tuning for swapin readahead

2012-09-06 Thread Konstantin Khlebnikov
/linux-mm/msg41128.html mine version uses system wide state rather than per-VMA counters. Signed-off-by: Konstantin Khlebnikov Cc: Shaohua Li Cc: Rik van Riel Cc: Minchan Kim --- include/linux/page-flags.h |1 + mm/swap_state.c| 42 +- 2

Re: [PATCH RFC] mm/swap: automatic tuning for swapin readahead

2012-10-09 Thread Konstantin Khlebnikov
Hugh Dickins wrote: On Thu, 4 Oct 2012, Konstantin Khlebnikov wrote: Here results of my test. Workload isn't very realistic, but at least it threaded: compiling linux-3.6 with defconfig in 16 threads on tmpfs, 512mb ram, dualcore cpu, ordinary hard disk. (test script in attachment) av

Re: [REGRESSION 3.8-r1] broken pci irq/pm state for e1000e device

2013-01-01 Thread Konstantin Khlebnikov
Konstantin Khlebnikov wrote: Seems like it's unrelated to e1000e driver itself, because I tried to revert all it's changes down to 3.6 one by one and it does not help. Looks like regression somewhere in pci-bus irq or power-management. because I see underflow of counter pci_dev-&

Re: [REGRESSION 3.8-r1] broken pci irq/pm state for e1000e device

2013-01-05 Thread Konstantin Khlebnikov
Konstantin Khlebnikov wrote: Konstantin Khlebnikov wrote: Seems like it's unrelated to e1000e driver itself, because I tried to revert all it's changes down to 3.6 one by one and it does not help. Ouch, 3.6 also affected, seems like I was more lucky at that time and bug never showed

[PATCH] drivers/watchdog/eurotechwdt: handle spurious interrupts on wrong hardware

2012-12-18 Thread Konstantin Khlebnikov
without special hardware, but such bugs blocks mine automatic testing for allmodconfig kernels. Signed-off-by: Konstantin Khlebnikov Cc: Wim Van Sebroeck Cc: linux-watch...@vger.kernel.org Cc: Alan Cox --- by default driver uses 10th irq, on my machine it's free: root@buzz:~#

Re: [PATCH] mm/swap: abort swapoff after disk error

2012-12-18 Thread Konstantin Khlebnikov
Hugh Dickins wrote: On Fri, 14 Dec 2012, Konstantin Khlebnikov wrote: Content of non-uptodate pages completely random, we cannot expose them into userspace. This leads to information leak and will crash userspace for sure. Good find, yes, it's very wrong as is. But, sorry, I don't

Re: [PATCH] drivers/watchdog/eurotechwdt: handle spurious interrupts on wrong hardware

2012-12-19 Thread Konstantin Khlebnikov
Konstantin Khlebnikov wrote: "eurotechwdt" hasn't any PCI-ID or DMI checks, thus is can be loaded on any hardware. On my PC this leads to immediate reboot, because driver got irq right after registering irq handler. This patch rejects interrupts until device activation. There is n

Re: [PATCH] mm/swap: add independed bio pool for swap

2012-12-20 Thread Konstantin Khlebnikov
Andrew Morton wrote: On Mon, 17 Dec 2012 20:45:13 -0800 (PST) Hugh Dickins wrote: On Fri, 14 Dec 2012, Konstantin Khlebnikov wrote: This bio pool guarantees reclaiming progress for anonymous pages. All avaliable bio in fs_bio_set may be borrowed by writeback which may never ends, because

Re: [PATCH] bug: Fix sparse warning related to BUILD_BUG_ON_INVALID

2012-11-19 Thread Konstantin Khlebnikov
rror: not a function Signed-off-by: Tushar Behera Thanks. Signed-off-by: Konstantin Khlebnikov --- include/linux/bug.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index aaac4bb..b1cf40d 100644 --- a/include/linux/bug.h +++ b/in

Re: e1000e + suspend, 3.9-rc2

2013-06-12 Thread Konstantin Khlebnikov
Jiri Slaby wrote: On 04/15/2013 05:29 PM, Jiri Slaby wrote: On 03/29/2013 07:04 PM, Allan, Bruce W wrote: -Original Message- From: Jiri Slaby [mailto:jirisl...@gmail.com] On Behalf Of Jiri Slaby Sent: Tuesday, March 19, 2013 5:23 AM To: Konstantin Khlebnikov Cc: Borislav Petkov

[PATCH] drm/i915: fix long-standing SNB regression in power consumption after resume

2013-07-14 Thread Konstantin Khlebnikov
ing() fixes this bug. References: https://bugs.freedesktop.org/show_bug.cgi?id=54089 Signed-off-by: Konstantin Khlebnikov --- drivers/gpu/drm/i915/intel_pm.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index aa01128..

Re: [PATCH] drm/i915: fix long-standing SNB regression in power consumption after resume

2013-07-14 Thread Konstantin Khlebnikov
Daniel Vetter wrote: On Sun, Jul 14, 2013 at 6:30 PM, Konstantin Khlebnikov wrote: This patch fixes regression in power consumtion of sandy bridge gpu, which exists since v3.6 Sometimes after resuming from s2ram gpu starts thinking that it's extremely busy. After that it never reache

  1   2   3   4   5   6   7   8   9   10   >