Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-19 Thread Google
gt; > > static int e_show(struct seq_file *m, void *v) > > > { > > > - struct eventfs_file *ef = v; > > > + struct eventfs_inode *ei = v; > > > + int i; > > > > > > - seq_printf(m, "%s", ef->name); > > > - if (ef->ei) > > > - seq_putc(m, '/'); > > > + seq_printf(m, "%s", ei->name); > > > > > > - if (ef->dentry) > > > - seq_printf(m, " dentry: (%d)", d_count(ef->dentry)); > > > + if (ei->dentry) > > > + seq_printf(m, " dentry: (%d)", d_count(ei->dentry)); > > > seq_putc(m, '\n'); > > > > > > + for (i = 0; i < ei->nr_entries; i++) { > > > + struct dentry *dentry = ei->d_children[i]; > > > + if (dentry) { > > > + seq_printf(m, " %s dentry: %px (%d)\n", > > > +ei->entries[i].name, dentry, > > > d_count(dentry)); > > > + } > > > + } > > > return 0; > > > } > > > > > > @@ -111,30 +117,25 @@ eventfs_show_dentry_open(struct inode *inode, > > > struct file *file) > > > { > > > const struct seq_operations *seq_ops = _show_dentry_seq_ops; > > > struct event_list *elist; > > > - struct tracefs_inode *ti; > > > struct eventfs_inode *ei; > > > - struct dentry *dentry; > > > > > > - /* The inode private should have the dentry of the "events" directory */ > > > - dentry = inode->i_private; > > > - if (!dentry) > > > + /* The inode private should have the eventfs_inode of the "events" > > > directory */ > > > + ei = inode->i_private; > > > + if (!ei) > > > return -EINVAL; > > > > > > elist = __seq_open_private(file, seq_ops, sizeof(*elist)); > > > if (!elist) > > > return -ENOMEM; > > > > > > - ti = get_tracefs(dentry->d_inode); > > > - ei = ti->private; > > > - > > > /* > > >* Start off at level 0 (/sys/kernel/tracing/events) > > >* Initialize head to the events files and next to the > > >* first file. > > >*/ > > > elist->level = 0; > > > - elist->head[0] = >e_top_files; > > > - elist->next[0] = ei->e_top_files.next; > > > + elist->head[0] = >children; > > > + elist->next[0] = ei->children.next; > > > > > > return 0; > > > } > > > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > > > index 891653ba9cf3..34ffb2f8114e 100644 > > > --- a/fs/tracefs/inode.c > > > +++ b/fs/tracefs/inode.c > > > @@ -385,7 +385,7 @@ static void tracefs_dentry_iput(struct dentry > > > *dentry, struct inode *inode) > > > > > > ti = get_tracefs(inode); > > > if (ti && ti->flags & TRACEFS_EVENT_INODE) > > > - eventfs_set_ef_status_free(ti, dentry); > > > + eventfs_set_ei_status_free(ti, dentry); > > > iput(inode); > > > } > > > > > > diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h > > > index 461920f0133f..ea3b01c0971a 100644 > > > --- a/fs/tracefs/internal.h > > > +++ b/fs/tracefs/internal.h > > > @@ -9,35 +9,36 @@ enum { > > > TRACEFS_EVENT_TOP_INODE = BIT(2), > > > }; > > > > > > -struct eventfs_inode { > > > - struct list_heade_top_files; > > > +struct tracefs_inode { > > > + unsigned long flags; > > > + void*private; > > > + struct inodevfs_inode; > > > }; > > > > > > /* > > > - * struct eventfs_file - hold the properties of the eventfs files and > > > - * directories. > > > - * @name:the name of the file or directory to create > > > - * @d_parent: holds parent's dentry > > > - * @dentry: once accessed holds dentry > > > - * @list:file or directory to be added to parent directory > > > - * @ei: list of files and directories within directory > > > - * @fop: file_operations for file or directory > > > - * @iop: inode_operations for file or directory > > > - * @data:something that the caller will want to get to later on > > > - * @mode:the permission that the file or directory should have > > > + * struct eventfs_inode - hold the properties of the eventfs directories. > > > + * @list:link list into the parent directory > > > + * @entries: the array of entries representing the files in the > > > directory > > > + * @name:the name of the directory to create > > > > @children: link list into the child eventfs_inode > > Thanks! This got chopped a few times during rebasing. > > > > > > + * @dentry: the dentry of the directory > > > + * @d_parent: pointer to the parent's dentry > > > + * @d_children: The array of dentries to represent the files when created > > > + * @data:The private data to pass to the callbacks > > > + * @nr_entries: The number of items in @entries > > > */ > > > -struct eventfs_file { > > > +struct eventfs_inode { > > > + struct list_headlist; > > > + const struct eventfs_entry *entries; > > > const char *name; > > > - struct dentry *d_parent; > > > + struct list_headchildren; > > > struct dentry *dentry; > > > - struct list_headlist; > > > - struct eventfs_inode*ei; > > > - const struct file_operations*fop; > > > - const struct inode_operations *iop; > > > + struct dentry *d_parent; > > > + struct dentry **d_children; > > > + void*data; > > > /* > > >* Union - used for deletion > > > - * @del_list: list of eventfs_file to delete > > > - * @rcu:eventfs_file to delete in RCU > > > + * @del_list: list of eventfs_inode to delete > > > + * @rcu:eventfs_indoe to delete in RCU > > >* @is_freed: node is freed if one of the above is set > > >*/ > > > union { > > > > Thank you, > > > > Thank you for reviewing! > > I'll need to send a v2. > > I'll have to do that anyway, as Linus nacked the show_eventfs_dentries file > :-( Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH] kprobes: Remove unnecessary initial values of variables

2023-09-18 Thread Google
On Tue, 19 Sep 2023 09:28:23 +0800 Li zeming wrote: > ri and sym is assigned first, so it does not need to initialize the > assignment. > Yes, thanks for fixing! Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Li zeming > --- > kernel/kprobes.c | 4 ++-- &g

Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-18 Thread Google
Hi Steve, On Thu, 14 Sep 2023 12:35:05 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of having a descriptor for every file represented in the eventfs > directory, only have the directory itself represented. Change the API to >

Re: [PATCH] tracing/synthetic: Print out u64 values properly

2023-09-15 Thread Google
Hi Tero, On Fri, 15 Sep 2023 13:46:45 +0300 Tero Kristo wrote: > Hi Masami, > > On 15/09/2023 09:01, Masami Hiramatsu (Google) wrote: > > Hi Tero, > > > > On Mon, 11 Sep 2023 17:17:04 +0300 > > Tero Kristo wrote: > > > >> The synth traces

Re: [PATCH] tracing/synthetic: Print out u64 values properly

2023-09-15 Thread Google
space); > + trace_seq_printf(s, print_fmt, name, val->as_u64, space); > break; > } > } > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Google
else { set_bit(bit - BITS_PER_LONG + offs, LONG_ALIGNED(ptr) + 1); } #endif } And use it. Thank you, > > kunmap_local(kaddr); > unpin_user_pages_dirty_lock(, 1, true); > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH 3/3] tracing/selftests: Update kprobe args char/string to match new functions

2023-09-13 Thread Google
On Tue, 12 Sep 2023 22:58:58 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The function that the kprobe_args_char and kprobes_arg_string attaches to > for its test has changed its name once again. Now we need to check for > eventfs_create_dir

Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Google
0c0 from 0xffff80008000 > PHYS_OFFSET: 0xcc5b8000 > CPU features: 0x88000203,3c02,1000421b > Memory Limit: none > Rebooting in 1 seconds.. > This looks good to me! Acked-by: Masami Hiramatsu (Google) Thanks! > Fixes: 5bdcd5f5331a ("eventfs: Implemen

Re: [PATCH v4 4/9] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook

2023-09-11 Thread Google
On Mon, 11 Sep 2023 09:55:09 +0200 Sven Schnelle wrote: > Masami Hiramatsu (Google) writes: > > >> > IOW, it is ftrace save regs/restore regs code issue. I need to check how > >> > the > >> > function_graph implements it. > >>

Re: [PATCH v3] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-11 Thread Google
x384b00c0 from 0x80008000 > PHYS_OFFSET: 0xcc5b8000 > CPU features: 0x88000203,3c02,1000421b > Memory Limit: none > Rebooting in 1 seconds.. > > Fixes: 5bdcd5f5331a ("eventfs: Implement removal of meta data from eventfs") > Signed-off-by

suspicious RCU usage warning on tracing/urgent

2023-09-10 Thread Google
without any problem. Thank you, -- Masami Hiramatsu (Google)

Re: [RESEND][PATCH] tracing/synthetic: Fix order of struct trace_dynamic_info

2023-09-10 Thread Google
On Fri, 8 Sep 2023 16:39:29 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > To make handling BIG and LITTLE endian better the offset/len of dynamic > fields of the synthetic events was changed into a structure of: > > struct tr

Re: [PATCH] ftrace/selftests: Add softlink to latest log directory

2023-09-10 Thread Google
On Fri, 8 Sep 2023 18:17:21 -0400 Steven Rostedt wrote: > From: Steven Rostedt (Google) > > When I'm debugging something with the ftrace selftests and need to look at > the logs, it becomes tedious that I need to do the following: > > ls -ltr logs > [ copy the last d

Re: [PATCH v4 4/9] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook

2023-09-09 Thread Google
Hi Sven, On Wed, 06 Sep 2023 08:49:11 +0200 Sven Schnelle wrote: > Hi Masami, > > Masami Hiramatsu (Google) writes: > > > Thus, we need to ensure that the ftrace_regs which is saved in the ftrace > > *without* FTRACE_WITH_REGS flags, can be used for hooking the fu

[PATCH resend 7/8] Documentation: Add core scheduling documentation

2021-03-24 Thread Joel Fernandes (Google)
Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/hw-vuln/core-scheduling.rst | 460 ++ Documentation/admin-guide/hw-vuln/index.rst | 1 + 2 files changed, 461 insertions(+) create mode 100644 Documentation/admin-guide/hw-vuln/core-scheduling.rst diff --git

[PATCH resend 3/8] sched: prctl() cookie manipulation for core scheduling

2021-03-24 Thread Joel Fernandes (Google)
From: chris hyser This patch provides support for setting, clearing and copying core scheduling 'task cookies' between threads (PID), processes (TGID), and process groups (PGID). The value of core scheduling isn't that tasks don't share a core, 'nosmt' can do that. The value lies in exploiting

[PATCH resend 6/8] kselftest: Add tests for core-sched interface

2021-03-24 Thread Joel Fernandes (Google)
Add a kselftest test to ensure that the core-sched interface is working correctly. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Co-developed-by: Josh Don Signed-off-by: Josh Don Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) Signed-off-by: chris hyser

[PATCH resend 8/8] sched: Debug bits...

2021-03-24 Thread Joel Fernandes (Google)
Tested-by: Julien Desfossez Not-Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 40 +++- kernel/sched/fair.c | 12 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH resend 5/8] sched: cgroup cookie API for core scheduling

2021-03-24 Thread Joel Fernandes (Google)
From: Josh Don This adds the API to set/get the cookie for a given cgroup. This interface lives at cgroup/cpu.core_tag. The cgroup interface can be used to toggle a unique cookie value for all descendent tasks, preventing these tasks from sharing with any others. See

[PATCH resend 1/8] sched: migration changes for core scheduling

2021-03-24 Thread Joel Fernandes (Google)
the idlest CPU whose core cookie matches with task's cookie Signed-off-by: Aubrey Li Signed-off-by: Tim Chen Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 29 ++ kernel/sched/sched.h | 73

[PATCH resend 2/8] sched: core scheduling tagging infrastructure

2021-03-24 Thread Joel Fernandes (Google)
. Core scheduler has extra overhead. Enable it only for machines with more than one SMT hardware thread. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Co-developed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Tested-by: Julien Desfossez Signed-off-by: Julien

[PATCH resend 4/8] kselftest: Add test for core sched prctl interface

2021-03-24 Thread Joel Fernandes (Google)
From: chris hyser Provides a selftest and examples of using the interface. Signed-off-by: Chris Hyser Signed-off-by: Josh Don --- tools/testing/selftests/sched/.gitignore | 1 + tools/testing/selftests/sched/Makefile| 14 + tools/testing/selftests/sched/config | 1

[PATCH resend 0/8] Core sched remaining patches rebased

2021-03-24 Thread Joel Fernandes (Google)
% improvement in keypress latency on a Google docs key press with Google hangout test (the maximum latency drops from 150ms to 50ms for keypresses). Julien: TPCC tests showed improvements with core-scheduling as below. With kernel protection enabled, it does not show any regression. Possibly ASI will improve

[PATCH 1/6] sched: migration changes for core scheduling

2021-03-19 Thread Joel Fernandes (Google)
-by: Tim Chen Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 33 +--- kernel/sched/sched.h | 72 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b

[PATCH 2/6] sched: tagging interface for core scheduling

2021-03-19 Thread Joel Fernandes (Google)
with more than one SMT hardware thread. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Co-developed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Tested-by: Julien Desfossez Signed-off-by: Julien Desfossez Signed-off-by: Tim Chen Signed-off-by: Peter Zijlstra (Intel

[PATCH 3/6] sched: prctl() cookie manipulation for core scheduling.

2021-03-19 Thread Joel Fernandes (Google)
From: chris hyser This patch provides support for setting, clearing and copying core scheduling 'task cookies' between threads (PID), processes (TGID), and process groups (PGID). The value of core scheduling isn't that tasks don't share a core, 'nosmt' can do that. The value lies in exploiting

[PATCH 4/6] kselftest: Add tests for core-sched interface

2021-03-19 Thread Joel Fernandes (Google)
Add a kselftest test to ensure that the core-sched interface is working correctly. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Co-developed-by: Josh Don Signed-off-by: Josh Don Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/sched

[PATCH 5/6] Documentation: Add core scheduling documentation

2021-03-19 Thread Joel Fernandes (Google)
Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/hw-vuln/core-scheduling.rst | 460 ++ Documentation/admin-guide/hw-vuln/index.rst | 1 + 2 files changed, 461 insertions(+) create mode 100644 Documentation/admin-guide/hw-vuln/core-scheduling.rst diff --git

[PATCH 6/6] sched: Debug bits...

2021-03-19 Thread Joel Fernandes (Google)
Tested-by: Julien Desfossez Not-Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 40 +++- kernel/sched/fair.c | 9 + 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH 0/6] Core scheduling remaining patches

2021-03-19 Thread Joel Fernandes (Google)
a CGroup and Per-task interface via prctl(2) are provided for configuring core sharing. More details are provided in documentation patch. Kselftests are provided to verify the correctness/rules of the interface. Testing === ChromeOS testing shows 300% improvement in keypress latency on a Google

[tip: core/rcu] rcu/tree: Make rcu_do_batch count how many callbacks were executed

2021-02-15 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 6bc335828056f3b301a3deadda782de4e8f0db08 Gitweb: https://git.kernel.org/tip/6bc335828056f3b301a3deadda782de4e8f0db08 Author:Joel Fernandes (Google) AuthorDate:Tue, 03 Nov 2020 09:25:57 -05:00

[tip: core/rcu] rcu/segcblist: Add additional comments to explain smp_mb()

2021-02-12 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: c2e13112e830c06825339cbadf0b3bc2bdb9a716 Gitweb: https://git.kernel.org/tip/c2e13112e830c06825339cbadf0b3bc2bdb9a716 Author:Joel Fernandes (Google) AuthorDate:Tue, 03 Nov 2020 09:26:03 -05:00

[tip: core/rcu] rcu/segcblist: Add counters to segcblist datastructure

2021-02-12 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: ae5c2341ed3987bd434ed495bd4f3d8b2bc3e623 Gitweb: https://git.kernel.org/tip/ae5c2341ed3987bd434ed495bd4f3d8b2bc3e623 Author:Joel Fernandes (Google) AuthorDate:Wed, 23 Sep 2020 11:22:09 -04:00

[tip: core/rcu] rcu/segcblist: Add debug checks for segment lengths

2021-02-12 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: b4e6039e8af8c20dfbbdfcaebfcbd7c9d9ffe713 Gitweb: https://git.kernel.org/tip/b4e6039e8af8c20dfbbdfcaebfcbd7c9d9ffe713 Author:Joel Fernandes (Google) AuthorDate:Wed, 18 Nov 2020 11:15:41 -05:00

[tip: core/rcu] rcu/tree: segcblist: Remove redundant smp_mb()s

2021-02-12 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 68804cf1c905ce227e4e1d0bc252c216811c59fd Gitweb: https://git.kernel.org/tip/68804cf1c905ce227e4e1d0bc252c216811c59fd Author:Joel Fernandes (Google) AuthorDate:Wed, 14 Oct 2020 18:21:53 -04:00

[tip: core/rcu] rcu/trace: Add tracing for how segcb list changes

2021-02-12 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 3afe7fa535491ecd0382c3968dc2349602bff8a2 Gitweb: https://git.kernel.org/tip/3afe7fa535491ecd0382c3968dc2349602bff8a2 Author:Joel Fernandes (Google) AuthorDate:Sat, 14 Nov 2020 14:31:32 -05:00

[PATCH v10 2/5] sched: CGroup tagging interface for core scheduling

2021-01-22 Thread Joel Fernandes (Google)
for now that avoids such complications. Core scheduler has extra overhead. Enable it only for core with more than one SMT hardware threads. Co-developed-by: Josh Don Co-developed-by: Chris Hyser Co-developed-by: Joel Fernandes (Google) Tested-by: Julien Desfossez Signed-off-by: Tim Chen

[PATCH v10 3/5] kselftest: Add tests for core-sched interface

2021-01-22 Thread Joel Fernandes (Google)
Add a kselftest test to ensure that the core-sched interface is working correctly. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Tested-by: Julien Desfossez Reviewed-by: Josh Don Signed-off-by: Josh Don Signed-off-by: Chris Hyser Signed-off-by: Joel Fernandes (Google) --- tools

[PATCH v10 1/5] sched: migration changes for core scheduling

2021-01-22 Thread Joel Fernandes (Google)
-by: Tim Chen Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 33 +--- kernel/sched/sched.h | 72 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b

[PATCH v10 5/5] sched: Debug bits...

2021-01-22 Thread Joel Fernandes (Google)
Tested-by: Julien Desfossez Not-Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 35 ++- kernel/sched/fair.c | 9 + 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH v10 4/5] Documentation: Add core scheduling documentation

2021-01-22 Thread Joel Fernandes (Google)
Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/hw-vuln/core-scheduling.rst | 263 ++ Documentation/admin-guide/hw-vuln/index.rst | 1 + 2 files changed, 264 insertions(+) create mode 100644 Documentation/admin-guide/hw-vuln/core-scheduling.rst diff --git

[PATCH v10 0/5] Core scheduling remaining patches

2021-01-22 Thread Joel Fernandes (Google)
to verify the correctness/rules of the interface. Testing === ChromeOS testing shows 300% improvement in keypress latency on a Google docs key press with Google hangout test (the maximum latency drops from 150ms to 50ms for keypresses). Vineeth tested sysbench on v9 series and does not see any

[PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-22 Thread Joel Fernandes (Google)
) *99.0th: 717 (7 samples) 99.5th: 725 (2 samples) 99.9th: 725 (0 samples) Cc: Paul McKenney Cc: Frederic Weisbecker Suggested-by: Dietmar Eggeman Co-developed-by: Qais Yousef Signed-off-by: Qais Yousef Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 2

[tip: core/rcu] rcu/tree: Add a warning if CPU being onlined did not report QS already

2020-12-13 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 9f866dac94292f93d3b6bf8dbe860a44b954e555 Gitweb: https://git.kernel.org/tip/9f866dac94292f93d3b6bf8dbe860a44b954e555 Author:Joel Fernandes (Google) AuthorDate:Tue, 29 Sep 2020 15:29:27 -04:00

[tip: core/rcu] rcu/tree: nocb: Avoid raising softirq for offloaded ready-to-execute CBs

2020-12-13 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: bd56e0a4a291bc9db2cbaddef20ec61a1aad4208 Gitweb: https://git.kernel.org/tip/bd56e0a4a291bc9db2cbaddef20ec61a1aad4208 Author:Joel Fernandes (Google) AuthorDate:Wed, 07 Oct 2020 13:50:36 -07:00

[tip: core/rcu] docs: Update RCU's hotplug requirements with a bit about design

2020-12-13 Thread tip-bot2 for Joel Fernandes (Google)
The following commit has been merged into the core/rcu branch of tip: Commit-ID: a043260740d5d6ec5be59c3fb595c719890a0b0b Gitweb: https://git.kernel.org/tip/a043260740d5d6ec5be59c3fb595c719890a0b0b Author:Joel Fernandes (Google) AuthorDate:Tue, 29 Sep 2020 15:29:28 -04:00

[PATCH v2] rcu/segcblist: Add debug checks for segment lengths

2020-11-18 Thread Joel Fernandes (Google)
After rcu_do_batch(), add a check for whether the seglen counts went to zero if the list was indeed empty. Signed-off-by: Joel Fernandes (Google) --- v1->v2: Added more debug checks. kernel/rcu/rcu_segcblist.c | 12 kernel/rcu/rcu_segcblist.h | 3 +++ kernel/rcu/tre

[PATCH] rcu/segcblist: Add debug check for whether seglen is 0 for empty list

2020-11-18 Thread Joel Fernandes (Google)
After rcu_do_batch(), add a check for whether the seglen counts went to zero if the list was indeed empty. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c | 12 kernel/rcu/rcu_segcblist.h | 3 +++ kernel/rcu/tree.c | 1 + 3 files changed, 16

[PATCH -tip 09/32] sched/fair: Snapshot the min_vruntime of CPUs on force idle

2020-11-17 Thread Joel Fernandes (Google)
-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 33 - kernel/sched/fair.c | 40 kernel/sched/sched.h | 5 + 3 files changed, 65 insertions(+), 13 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched

[PATCH -tip 08/32] sched/fair: Fix forced idle sibling starvation corner case

2020-11-17 Thread Joel Fernandes (Google)
to schedule. Tested-by: Julien Desfossez Reviewed-by: Joel Fernandes (Google) Signed-off-by: Vineeth Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 15 --- kernel/sched/fair.c | 40

[PATCH -tip 21/32] sched: CGroup tagging interface for core scheduling

2020-11-17 Thread Joel Fernandes (Google)
Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 183 +-- kernel/sched/sched.h | 4 + 2 files changed, 181 insertions(+), 6 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7f807a84cc30..b99a7493d590

[PATCH -tip 15/32] sched: Improve snapshotting of min_vruntime for CGroups

2020-11-17 Thread Joel Fernandes (Google)
. Reviewed-by: Vineeth Pillai Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 61 + kernel/sched/fair.c | 80 kernel/sched/sched.h | 7 +++- 3 files changed, 97

[PATCH -tip 19/32] entry/idle: Enter and exit kernel protection during idle entry and exit

2020-11-17 Thread Joel Fernandes (Google)
Add a generic_idle_{enter,exit} helper function to enter and exit kernel protection when entering and exiting idle, respectively. While at it, remove a stale RCU comment. Reviewed-by: Alexandre Chartre Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- include/linux/entry

[PATCH -tip 32/32] sched: Debug bits...

2020-11-17 Thread Joel Fernandes (Google)
Tested-by: Julien Desfossez Not-Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 35 ++- kernel/sched/fair.c | 9 + 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH -tip 31/32] sched: Add a coresched command line option

2020-11-17 Thread Joel Fernandes (Google)
Fernandes (Google) --- .../admin-guide/kernel-parameters.txt | 14 ++ arch/x86/kernel/cpu/bugs.c| 19 include/linux/cpu.h | 1 + include/linux/sched/smt.h | 4 ++ kernel/cpu.c

[PATCH -tip 30/32] Documentation: Add core scheduling documentation

2020-11-17 Thread Joel Fernandes (Google)
Document the usecases, design and interfaces for core scheduling. Co-developed-by: Vineeth Pillai Signed-off-by: Vineeth Pillai Tested-by: Julien Desfossez Reviewed-by: Randy Dunlap Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/hw-vuln/core-scheduling.rst | 330

[PATCH -tip 13/32] sched: Trivial forced-newidle balancer

2020-11-17 Thread Joel Fernandes (Google)
Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) --- include/linux/sched.h | 1 + kernel/sched/core.c | 130 +- kernel/sched/idle.c | 1 + kernel/sched/sched.h | 6 ++ 4 files changed, 137 insertions(+), 1

[PATCH -tip 29/32] sched: Move core-scheduler interfacing code to a new file

2020-11-17 Thread Joel Fernandes (Google)
-by: Julien Desfossez Reviewed-by: Chris Hyser Signed-off-by: Chris Hyser Signed-off-by: Joel Fernandes (Google) --- kernel/sched/Makefile | 1 + kernel/sched/core.c| 809 +--- kernel/sched/coretag.c | 819 + kernel

[PATCH -tip 03/32] sched/fair: Fix pick_task_fair crashes due to empty rbtree

2020-11-17 Thread Joel Fernandes (Google)
ime. Suggested-by: Vineeth Remanan Pillai Signed-off-by: Peter Zijlstra Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 12cf068eeec8..51483a00a755 100

[PATCH -tip 26/32] sched: Add a second-level tag for nested CGroup usecase

2020-11-17 Thread Joel Fernandes (Google)
From: Josh Don Google has a usecase where the first level tag to tag a CGroup is not sufficient. So, a patch is carried for years where a second tag is added which is writeable by unprivileged users. Google uses DAC controls to make the 'tag' possible to set only by root while the second-level

[PATCH -tip 28/32] kselftest: Add tests for core-sched interface

2020-11-17 Thread Joel Fernandes (Google)
Add a kselftest test to ensure that the core-sched interface is working correctly. Tested-by: Julien Desfossez Reviewed-by: Josh Don Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/sched/.gitignore | 1 + tools/testing/selftests/sched/Makefile| 14 + tools

[PATCH -tip 27/32] sched/debug: Add CGroup node for printing group cookie if SCHED_DEBUG

2020-11-17 Thread Joel Fernandes (Google)
This will be used by kselftest to verify the CGroup cookie value that is set by the CGroup interface. Reviewed-by: Josh Don Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 31 +++ 1 file changed, 31 insertions(+) diff

[PATCH -tip 25/32] sched: Refactor core cookie into struct

2020-11-17 Thread Joel Fernandes (Google)
of existing core cookies so that multiple tasks may share the same core_cookie. This will be especially useful in the next patch, where the concept of cookie color is introduced. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Josh Don Signed-off-by: Joel Fernandes (Google) --- kernel

[PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-11-17 Thread Joel Fernandes (Google)
Add a per-thread core scheduling interface which allows a thread to share a core with another thread, or have a core exclusively for itself. ChromeOS uses core-scheduling to securely enable hyperthreading. This cuts down the keypress latency in Google docs from 150ms to 50ms while improving

[PATCH -tip 24/32] sched: Release references to the per-task cookie on exit

2020-11-17 Thread Joel Fernandes (Google)
Fernandes (Google) --- include/linux/sched.h | 3 +++ kernel/fork.c | 1 + kernel/sched/core.c | 8 3 files changed, 12 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index 79d76c78cc8e..6fbdb1a204bf 100644 --- a/include/linux/sched.h +++ b/include/linux

[PATCH -tip 22/32] sched: Split the cookie and setup per-task cookie on fork

2020-11-17 Thread Joel Fernandes (Google)
APIs and support. Reviewed-by: Josh Don Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- include/linux/sched.h | 2 + kernel/sched/core.c | 241 -- kernel/sched/debug.c | 4 + 3 files changed, 236 insertions(+), 11 deletions

[PATCH -tip 20/32] entry/kvm: Protect the kernel when entering from guest

2020-11-17 Thread Joel Fernandes (Google)
From: Vineeth Pillai Similar to how user to kernel mode transitions are protected in earlier patches, protect the entry into kernel from guest mode as well. Tested-by: Julien Desfossez Reviewed-by: Joel Fernandes (Google) Reviewed-by: Alexandre Chartre Signed-off-by: Vineeth Pillai Signed

[PATCH -tip 18/32] kernel/entry: Add support for core-wide protection of kernel-mode

2020-11-17 Thread Joel Fernandes (Google)
-by: Vineeth Pillai Signed-off-by: Vineeth Pillai Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/kernel-parameters.txt | 11 + include/linux/entry-common.h | 12 +- include/linux/sched.h | 12 + kernel/entry/common.c

[PATCH -tip 17/32] arch/x86: Add a new TIF flag for untrusted tasks

2020-11-17 Thread Joel Fernandes (Google)
. Tested-by: Julien Desfossez Reviewed-by: Aubrey Li Signed-off-by: Joel Fernandes (Google) --- arch/x86/include/asm/thread_info.h | 2 ++ kernel/sched/sched.h | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm

[PATCH -tip 16/32] irq_work: Cleanup

2020-11-17 Thread Joel Fernandes (Google)
-off-by: Joel Fernandes (Google) --- drivers/gpu/drm/i915/i915_request.c | 4 ++-- include/linux/irq_work.h| 33 ++--- include/linux/irqflags.h| 4 ++-- kernel/bpf/stackmap.c | 2 +- kernel/irq_work.c | 18

[PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-17 Thread Joel Fernandes (Google)
-by: Tim Chen Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 64 kernel/sched/sched.h | 29 2 files changed, 88 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b

[PATCH -tip 12/32] sched: Simplify the core pick loop for optimized case

2020-11-17 Thread Joel Fernandes (Google)
in case anyone reports an issue with it. Testing shows it to be working for me. Reviewed-by: Vineeth Pillai Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 73 - 1 file changed, 26 insertions

[PATCH -tip 10/32] sched: Fix priority inversion of cookied task with sibling

2020-11-17 Thread Joel Fernandes (Google)
OTE: This problem will be fixed differently in a later patch. It just kept here for reference purposes about this issue, and to make applying later patches easier. Reported-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra Signed-off-by: Joel Fernandes (Google) --- kernel/sc

[PATCH -tip 11/32] sched: Enqueue task into core queue only after vruntime is updated

2020-11-17 Thread Joel Fernandes (Google)
it by enqueuing into the core queue only after the class-specific enqueue callback has been called. This ensures that for CFS tasks, the updated vruntime value is used when enqueuing the task into the core rbtree. Reviewed-by: Vineeth Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/sched

[PATCH -tip 07/32] sched: Add core wide task selection and scheduling.

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Instead of only selecting a local task, select a task for all SMT siblings for every reschedule on the core (irrespective which logical CPU does the reschedule). Tested-by: Julien Desfossez Reviewed-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Signed

[PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-17 Thread Joel Fernandes (Google)
(Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/deadline.c | 16 ++-- kernel/sched/fair.c | 32 +++- kernel/sched/idle.c | 8 kernel/sched/rt.c

[PATCH -tip 06/32] sched: Basic tracking of matching tasks

2020-11-17 Thread Joel Fernandes (Google)
and that just duplicates a lot of stuff for no raisin (the 2nd copy lives in the rt-mutex PI code). Reviewed-by: Joel Fernandes (Google) Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel

[PATCH -tip 04/32] sched: Core-wide rq->lock

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Introduce the basic infrastructure to have a core wide rq->lock. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Julien Desfossez Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/Kconfig.pree

[PATCH -tip 05/32] sched/fair: Add a few assertions

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 51483a00a755

[PATCH -tip 01/32] sched: Wrap rq::lock access

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra In preparation of playing games with rq->lock, abstract the thing using an accessor. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel Fernandes (Goo

[PATCH -tip 00/32] Core scheduling (v9)

2020-11-17 Thread Joel Fernandes (Google)
solved: 1. Vruntime comparison. 2. Documentation updates. 3. CGroup and per-task interface developed by Google and Oracle. 4. Hotplug fixes. Almost all patches also have Reviewed-by or Acked-by tag. See below for full list of changes in v9. Introduction of feature === Core

[PATCH rcu-dev] rcu/trace: Add tracing for how segcb list changes

2020-11-14 Thread Joel Fernandes (Google)
in the respective segment. Reviewed-by: Frederic Weisbecker Reviewed-by: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 26 ++ kernel/rcu/tree.c | 9 + 2 files changed, 35 insertions(+) diff --git a/include/trace/events/rcu.h

[RFC 1/2] x86/bugs: Disable coresched on hardware that does not need it

2020-11-11 Thread Joel Fernandes (Google)
Some hardware such as certain AMD variants don't have cross-HT MDS/L1TF issues. Detect this and don't enable core scheduling as it can needlessly slow the device done. Signed-off-by: Joel Fernandes (Google) --- arch/x86/kernel/cpu/bugs.c | 8 kernel/sched/core.c| 7

[RFC 2/2] sched/debug: Add debug information about whether coresched is enabled

2020-11-11 Thread Joel Fernandes (Google)
It is useful to see whether coresched is enabled or not, especially in devices that don't need it. Add information about the same to /proc/sched_debug. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/debug.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/sched/debug.c b

[RFC 0/2] Do not slow down some AMD devices with coresched

2020-11-11 Thread Joel Fernandes (Google)
information. In the future, if needed we could add more options to make it possible to force-enable coresched. But right now I don't see a need for that, till a usecase arises. Joel Fernandes (Google) (2): x86/bugs: Disable coresched on hardware that does not need it sched/debug: Add debug

[PATCH v9 2/7] rcu/segcblist: Add counters to segcblist datastructure

2020-11-03 Thread Joel Fernandes (Google)
related to using donecbs's ->len field as a temporary variable to save the segmented callback list's length. This cannot be done anymore and is not needed. Reviewed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) --- include/linux/rcu_segcblist.h | 1 + kernel/

[PATCH v9 6/7] rcu/tree: segcblist: Remove redundant smp_mb()s

2020-11-03 Thread Joel Fernandes (Google)
This memory barrier is not needed as rcu_segcblist_add_len() already includes a memory barrier *before* and *after* the length of the list is updated. Same reasoning for rcu_segcblist_enqueue(). Reviewed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) --- kernel/rcu

[PATCH v9 0/7] Add support for length of each segment in the segcblist

2020-11-03 Thread Joel Fernandes (Google)
el.org/lkml/20200719034210.2382053-1-joel@x/) Joel Fernandes (Google) (7): rcu/tree: Make rcu_do_batch count how many callbacks were executed rcu/segcblist: Add counters to segcblist datastructure srcu: Fix invoke_rcu_callbacks() segcb length adjustment rcu/trace: Add tracing for how

[PATCH v9 5/7] rcu/segcblist: Remove useless rcupdate.h include

2020-11-03 Thread Joel Fernandes (Google)
Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/rcu/rcu_segcblist.c b/kernel/rcu/rcu_segcblist.c index 2a03949d0b82..e9e72d72f7a6 100644 --- a/kernel/rcu/rcu_segcblist.c +++ b/kernel/rcu/rcu_segcblist.c @@ -10,7

[PATCH v9 3/7] srcu: Fix invoke_rcu_callbacks() segcb length adjustment

2020-11-03 Thread Joel Fernandes (Google)
Weisbecker Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/srcutree.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c index 0f23d20d485a..79b7081143a7 100644 --- a/kernel/rcu/srcutree.c +++ b/kernel/rcu/srcutree.c @@ -1160,6

[PATCH v9 1/7] rcu/tree: Make rcu_do_batch count how many callbacks were executed

2020-11-03 Thread Joel Fernandes (Google)
d-by: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c | 2 +- kernel/rcu/rcu_segcblist.h | 1 + kernel/rcu/tree.c | 11 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/rcu/rcu_segcblist.c b/kernel/rcu/rcu_segcb

[PATCH v9 4/7] rcu/trace: Add tracing for how segcb list changes

2020-11-03 Thread Joel Fernandes (Google)
in the respective segment. Reviewed-by: Frederic Weisbecker Reviewed-by: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 25 + kernel/rcu/rcu_segcblist.c | 34 ++ kernel/rcu/rcu_segcblist.h | 5 + kernel/rcu

[PATCH v9 7/7] rcu/segcblist: Add additional comments to explain smp_mb()

2020-11-03 Thread Joel Fernandes (Google)
Memory barriers are needed when updating the full length of the segcblist, however it is not fully clearly why one is needed before and after. This patch therefore adds additional comments to the function header to explain it. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu

[PATCH v8 3/6] rcu/trace: Add tracing for how segcb list changes

2020-10-21 Thread Joel Fernandes (Google)
in the respective segment. Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 25 + kernel/rcu/rcu_segcblist.c | 31 +++ kernel/rcu/rcu_segcblist.h | 5 + kernel/rcu/tree.c | 9 + 4 files changed, 70 insertions

[PATCH v8 1/6] rcu/tree: Make rcu_do_batch count how many callbacks were executed

2020-10-21 Thread Joel Fernandes (Google)
from 0 is confusing and error-prone IMHO. This commit therefore explicitly counts how many callbacks were executed in rcu_do_batch() itself, and uses that to update the per-CPU segcb list's ->len field, without relying on the negativity of rcl->len. Signed-off-by: Joel Fernandes (Googl

[PATCH v8 2/6] rcu/segcblist: Add counters to segcblist datastructure

2020-10-21 Thread Joel Fernandes (Google)
related to using donecbs's ->len field as a temporary variable to save the segmented callback list's length. This cannot be done anymore and is not needed. Signed-off-by: Joel Fernandes (Google) --- include/linux/rcu_segcblist.h | 1 + kernel/rcu/rcu_segcblist.c|

[PATCH v8 0/6] Add support for length of each segment in the segcblist

2020-10-21 Thread Joel Fernandes (Google)
ous changes, bug fixes. Discovery of rcu_barrier issue. v4: Restructured rcu_do_batch() and segcblist merging to avoid issues. Fixed minor nit from Davidlohr. v1->v3: minor nits. (https://lore.kernel.org/lkml/20200719034210.2382053-1-joel@x/) Joel Fernandes (Google) (6): rc

[PATCH v8 4/6] rcu/segcblist: Remove useless rcupdate.h include

2020-10-21 Thread Joel Fernandes (Google)
Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/rcu/rcu_segcblist.c b/kernel/rcu/rcu_segcblist.c index b0aaa51e0ee6..19ff82b805fb 100644 --- a/kernel/rcu/rcu_segcblist.c +++ b/kernel/rcu/rcu_segcblist.c @@ -10,7

[PATCH v8 6/6] rcu/segcblist: Add additional comments to explain smp_mb()

2020-10-21 Thread Joel Fernandes (Google)
Memory barriers are needed when updating the full length of the segcblist, however it is not fully clearly why one is needed before and after. This patch therefore adds additional comments to the function header to explain it. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu

[PATCH v8 5/6] rcu/tree: segcblist: Remove redundant smp_mb()s

2020-10-21 Thread Joel Fernandes (Google)
This memory barrier is not needed as rcu_segcblist_add_len() already includes a memory barrier *before* the length of the list is updated. Same reasoning for rcu_segcblist_enqueue(). Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c | 1 - kernel/rcu/tree.c | 1

<    5   6   7   8   9   10   11   12   13   14   >