Re: [PATCH v3 1/2] pid: add pidfd_open()

2019-06-27 Thread Konstantin Khlebnikov
On 20.05.2019 18:56, Christian Brauner wrote: This adds the pidfd_open() syscall. It allows a caller to retrieve pollable pidfds for a process which did not get created via CLONE_PIDFD, i.e. for a process that is created via traditional fork()/clone() calls that is only referenced by a PID: int

Re: [PATCH v1 1/2] open: add close_range()

2019-05-23 Thread Konstantin Khlebnikov
On 22.05.2019 18:52, Christian Brauner wrote:> This adds the close_range() syscall. It allows to efficiently close a range > of file descriptors up to all file descriptors of a calling task. > > The syscall came up in a recent discussion around the new mount API and > making new file descriptor t

Re: [PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Konstantin Khlebnikov
On 15.07.2015 15:16, Eric Dumazet wrote: On Wed, 2015-07-15 at 12:52 +0300, Konstantin Khlebnikov wrote: These functions check should_resched() before unlocking spinlock/bh-enable: preempt_count always non-zero => should_resched() always returns false. cond_resched_lock() worked

[PATCH v2 1/3] drivers/xen/preempt: use need_resched() instead of should_resched()

2015-07-15 Thread Konstantin Khlebnikov
This code is used only when CONFIG_PREEMPT=n and only in non-atomic context: xen_in_preemptible_hcall is set only in privcmd_ioctl_hypercall(). Thus preempt_count is zero and should_resched() is equal to need_resched(). Signed-off-by: Konstantin Khlebnikov --- drivers/xen/preempt.c |2 +- 1

[PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Konstantin Khlebnikov
set constants for that: PREEMPT_DISABLE_OFFSET - offset after preempt_disable() PREEMPT_LOCK_OFFSET - offset after spin_lock() SOFTIRQ_DISABLE_OFFSET - offset after local_bh_distable() SOFTIRQ_LOCK_OFFSET - offset after spin_lock_bh() Signed-off-by: Konstantin Khlebnikov --- arch/x8

[PATCH v2 2/3] KVM: PPC: Book3S HV: Use need_resched() instead of should_resched()

2015-07-15 Thread Konstantin Khlebnikov
Function should_resched() is equal to (!preempt_count() && need_resched()). In preemptive kernel preempt_count here is non-zero because of vc->lock. Signed-off-by: Konstantin Khlebnikov --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-29 Thread Konstantin Khlebnikov
0.610962] ---[ end trace 0a600c0841386992 ]--- [0.615573] Kernel panic - not syncing: Fatal exception [0.620792] ---[ end Kernel panic - not syncing: Fatal exception *From:* Rob Herring <mailto:robherri...@gmail.com> *Date:* 2015-04-14 00:49 *To:* Konstantin Khlebnikov <mail

Re: [PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-13 Thread Konstantin Khlebnikov
On 13.04.2015 16:22, Rob Herring wrote: On Wed, Apr 8, 2015 at 11:59 AM, Konstantin Khlebnikov wrote: Node 0 might be offline as well as any other numa node, in this case kernel cannot handle memory allocation and crashes. Signed-off-by: Konstantin Khlebnikov Fixes: 0c3f061c195c (&qu

Re: [PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-08 Thread Konstantin Khlebnikov
On Thu, Apr 9, 2015 at 2:12 AM, Julian Calaby wrote: > Hi Konstantin, > > On Thu, Apr 9, 2015 at 3:04 AM, Konstantin Khlebnikov > wrote: >> On 08.04.2015 19:59, Konstantin Khlebnikov wrote: >>> >>> Node 0 might be offline as well as any other numa node, &

Re: [PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-08 Thread Konstantin Khlebnikov
On Thu, Apr 9, 2015 at 2:07 AM, Nishanth Aravamudan wrote: > On 08.04.2015 [20:04:04 +0300], Konstantin Khlebnikov wrote: >> On 08.04.2015 19:59, Konstantin Khlebnikov wrote: >> >Node 0 might be offline as well as any other numa node, >> >in this case kernel cannot h

Re: [PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-08 Thread Konstantin Khlebnikov
On 08.04.2015 19:59, Konstantin Khlebnikov wrote: Node 0 might be offline as well as any other numa node, in this case kernel cannot handle memory allocation and crashes. Example: [0.027133] [ cut here ] [0.027938] kernel BUG at include/linux/gfp.h:322

[PATCH] of: return NUMA_NO_NODE from fallback of_node_to_nid()

2015-04-08 Thread Konstantin Khlebnikov
Node 0 might be offline as well as any other numa node, in this case kernel cannot handle memory allocation and crashes. Signed-off-by: Konstantin Khlebnikov Fixes: 0c3f061c195c ("of: implement of_node_to_nid as a weak function") --- drivers/of/base.c |2 +- include/linux/o

[PATCH 10/16] mm/powerpc: use vm_flags_t for vma flags

2012-03-21 Thread Konstantin Khlebnikov
Signed-off-by: Konstantin Khlebnikov Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/mman.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h