Re: [RFC PATCH bpf-next v2 1/4] tracing/kprobe: bpf: Check error injectable event is on function entry

2017-12-26 Thread Masami Hiramatsu
On Tue, 26 Dec 2017 17:57:32 -0800 Alexei Starovoitov wrote: > On Tue, Dec 26, 2017 at 04:46:59PM +0900, Masami Hiramatsu wrote: > > Check whether error injectable event is on function entry or not. > > Currently it checks the event is ftrace-based kprobes or not, > > but that is wrong. It should

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > Also add the xa_lock() and xa_unlock() family of wrappers to make it > easier to use the lock. If we could rely on -fplan9-extensions in > the compiler, we could avoid all of this syntactic sugar, but that > wasn't a

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > This results in no change in structure size on 64-bit x86 as it fits in > > the padding between the gfp_t and the void *. > > The

Re: [PATCH v5 06/78] xarray: Change definition of sibling entries

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 08:21:53PM +0300, Kirill A. Shutemov wrote: > > +/** > > + * xa_is_internal() - Is the entry an internal entry? > > + * @entry: Entry retrieved from the XArray > > + * > > + * Return: %true if the entry is an internal entry. > > + */ > > What does it mean "internal entry"?

Re: [PATCH v5 05/78] xarray: Replace exceptional entries

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 08:15:42PM +0300, Kirill A. Shutemov wrote: > > 28 files changed, 249 insertions(+), 240 deletions(-) > > Everything looks fine to me after quick scan, but hat's a lot of changes for > one patch... Yeah. It's pretty mechanical though. > > - if (radix_t

Re: [RFC PATCH bpf-next v2 4/4] error-injection: Support fault injection framework

2017-12-26 Thread Alexei Starovoitov
On Tue, Dec 26, 2017 at 04:48:25PM +0900, Masami Hiramatsu wrote: > Support in-kernel fault-injection framework via debugfs. > This allows you to inject a conditional error to specified > function using debugfs interfaces. > > Signed-off-by: Masami Hiramatsu > --- > Documentation/fault-injection

Re: [RFC PATCH bpf-next v2 3/4] error-injection: Separate error-injection from kprobe

2017-12-26 Thread Alexei Starovoitov
On Tue, Dec 26, 2017 at 04:47:55PM +0900, Masami Hiramatsu wrote: > Since error-injection framework is not limited to be used > by kprobes, nor bpf. Other kernel subsystems can use it > freely for checking safeness of error-injection, e.g. > livepatch, ftrace etc. > So this separate error-injection

Re: [RFC PATCH bpf-next v2 2/4] tracing/kprobe: bpf: Compare instruction pointer with original one

2017-12-26 Thread Alexei Starovoitov
On Tue, Dec 26, 2017 at 04:47:26PM +0900, Masami Hiramatsu wrote: > Compare instruction pointer with original one on the > stack instead using per-cpu bpf_kprobe_override flag. > > This patch also consolidates reset_current_kprobe() and > preempt_enable_no_resched() blocks. Those can be done > in

Re: [RFC PATCH bpf-next v2 1/4] tracing/kprobe: bpf: Check error injectable event is on function entry

2017-12-26 Thread Alexei Starovoitov
On Tue, Dec 26, 2017 at 04:46:59PM +0900, Masami Hiramatsu wrote: > Check whether error injectable event is on function entry or not. > Currently it checks the event is ftrace-based kprobes or not, > but that is wrong. It should check if the event is on the entry > of target function. Since error i

Re: [PATCH v2 06/17] btrfs-progs: lowmem check: introduce force_cow_in_new_chunk()

2017-12-26 Thread Su Yue
On 12/26/2017 06:28 PM, Qu Wenruo wrote: On 2017年12月26日 16:17, Su Yue wrote: On 12/21/2017 03:12 PM, Qu Wenruo wrote: On 2017年12月21日 15:09, Su Yue wrote: On 12/21/2017 02:51 PM, Qu Wenruo wrote: On 2017年12月20日 16:37, Qu Wenruo wrote: On 2017年12月20日 16:21, Su Yue wrote: On 12

Re: [PATCH v5 06/78] xarray: Change definition of sibling entries

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:38PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Instead of storing a pointer to the slot containing the canonical entry, > store the offset of the slot. Produces slightly more efficient code > (~300 bytes) and simplifies the implementation. > > Signed-

Re: [PATCH v5 05/78] xarray: Replace exceptional entries

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:37PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Introduce xarray value entries to replace the radix tree exceptional > entry code. This is a slight change in encoding to allow the use of an > extra bit (we can now store BITS_PER_LONG - 1 bits in a value

Re: [PATCH v5 04/78] page cache: Use xa_lock

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:36PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Remove the address_space ->tree_lock and use the xa_lock newly added to > the radix_tree_root. Rename the address_space ->page_tree to ->pages, > since we don't really care that it's a tree. Take the oppo

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > This results in no change in structure size on 64-bit x86 as it fits in > the padding between the gfp_t and the void *. The patch does more than described in the subject and commit message. At first I was

Re: [PATCH v2 06/17] btrfs-progs: lowmem check: introduce force_cow_in_new_chunk()

2017-12-26 Thread Qu Wenruo
On 2017年12月26日 16:17, Su Yue wrote: > > > On 12/21/2017 03:12 PM, Qu Wenruo wrote: >> >> >> On 2017年12月21日 15:09, Su Yue wrote: >>> >>> >>> On 12/21/2017 02:51 PM, Qu Wenruo wrote: On 2017年12月20日 16:37, Qu Wenruo wrote: > > > On 2017年12月20日 16:21, Su Yue wrote: >>

Re: [PATCH v2 06/17] btrfs-progs: lowmem check: introduce force_cow_in_new_chunk()

2017-12-26 Thread Su Yue
On 12/21/2017 03:12 PM, Qu Wenruo wrote: On 2017年12月21日 15:09, Su Yue wrote: On 12/21/2017 02:51 PM, Qu Wenruo wrote: On 2017年12月20日 16:37, Qu Wenruo wrote: On 2017年12月20日 16:21, Su Yue wrote: On 12/20/2017 01:41 PM, Qu Wenruo wrote: On 2017年12月20日 12:57, Su Yue wrote: Introdu