Re: [PATCH v4] tracing: Support to dump instance traces by ftrace_dump_on_oops

2024-02-07 Thread Joel Fernandes
ffer and multiple instance buffer on all CPUs, or only dump on CPU > that triggered the oops if =2 or =orig_cpu is given > > Also, the sysctl node can handle the input accordingly. > > Cc: Ross Zwisler > Signed-off-by: Joel Fernandes (Google) > Signed-

Re: [PATCH v4] tracing: Support to dump instance traces by ftrace_dump_on_oops

2024-02-07 Thread Joel Fernandes
On Wed, Feb 7, 2024 at 6:14 AM Steven Rostedt wrote: > > On Wed, 7 Feb 2024 05:24:58 -0500 > Joel Fernandes wrote: > > > Btw, hopefully the "trace off on warning" and related boot parameters also > > apply > > to instances, I haven't personally check

Re: [PATCH v4] tracing: Support to dump instance traces by ftrace_dump_on_oops

2024-02-08 Thread Joel Fernandes
On 2/8/2024 4:22 AM, Huang Yiwei wrote: > > > On 2/7/2024 10:13 PM, Joel Fernandes wrote: [..] >>> Perhaps we need an option for these too, and have all options be >>> updated via the command line. That way we don't need to make special >>> boot line

Re: [PATCH] treewide: Rename rcu_dereference_raw_notrace to _check

2019-07-11 Thread Joel Fernandes
On Thu, Jul 11, 2019 at 4:45 PM Joel Fernandes (Google) wrote: > > The rcu_dereference_raw_notrace() API name is confusing. > It is equivalent to rcu_dereference_raw() except that it also does > sparse pointer checking. > > There are only a few users of rcu_dereference_r

Re: [PATCH] treewide: Rename rcu_dereference_raw_notrace to _check

2019-07-12 Thread Joel Fernandes
On Fri, Jul 12, 2019 at 08:01:07AM -0700, Paul E. McKenney wrote: > On Thu, Jul 11, 2019 at 04:45:41PM -0400, Joel Fernandes (Google) wrote: > > The rcu_dereference_raw_notrace() API name is confusing. > > It is equivalent to rcu_dereference_raw() except that it also does >

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-12 Thread Joel Fernandes
On Fri, Jul 12, 2019 at 01:00:18PM -0400, Joel Fernandes (Google) wrote: > The rcu/sync code was doing its own check whether we are in a reader > section. With RCU consolidating flavors and the generic helper added in > this series, this is no longer need. We can just use the generic hel

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-12 Thread Joel Fernandes
On Fri, Jul 12, 2019 at 04:32:06PM -0700, Paul E. McKenney wrote: > On Fri, Jul 12, 2019 at 05:35:59PM -0400, Joel Fernandes wrote: > > On Fri, Jul 12, 2019 at 01:00:18PM -0400, Joel Fernandes (Google) wrote: > > > The rcu/sync code was doing its own check whether we are in a re

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-12 Thread Joel Fernandes
On Fri, Jul 12, 2019 at 11:01:50PM -0400, Joel Fernandes wrote: > On Fri, Jul 12, 2019 at 04:32:06PM -0700, Paul E. McKenney wrote: > > On Fri, Jul 12, 2019 at 05:35:59PM -0400, Joel Fernandes wrote: > > > On Fri, Jul 12, 2019 at 01:00:18PM -0400, Joel Fernandes (Google) wrot

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-13 Thread Joel Fernandes
On Sat, Jul 13, 2019 at 01:21:14AM -0700, Paul E. McKenney wrote: > On Fri, Jul 12, 2019 at 11:10:08PM -0400, Joel Fernandes wrote: > > On Fri, Jul 12, 2019 at 11:01:50PM -0400, Joel Fernandes wrote: > > > On Fri, Jul 12, 2019 at 04:32:06PM -0700, Paul E. McKenney wrote: >

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-13 Thread Joel Fernandes
On Sat, Jul 13, 2019 at 07:41:08AM -0700, Paul E. McKenney wrote: > On Sat, Jul 13, 2019 at 09:30:49AM -0400, Joel Fernandes wrote: > > On Sat, Jul 13, 2019 at 01:21:14AM -0700, Paul E. McKenney wrote: > > > On Fri, Jul 12, 2019 at 11:10:08PM -0400, Joel Fernandes wrote: >

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-13 Thread Joel Fernandes
On Sat, Jul 13, 2019 at 08:50:10AM -0700, Paul E. McKenney wrote: > On Sat, Jul 13, 2019 at 11:36:06AM -0400, Joel Fernandes wrote: > > On Sat, Jul 13, 2019 at 07:41:08AM -0700, Paul E. McKenney wrote: > > > On Sat, Jul 13, 2019 at 09:30:49AM -0400, Joel Fernandes wrote: >

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-14 Thread Joel Fernandes
On Sat, Jul 13, 2019 at 02:28:12PM -0700, Paul E. McKenney wrote: > On Sat, Jul 13, 2019 at 12:13:16PM -0400, Joel Fernandes wrote: > > On Sat, Jul 13, 2019 at 08:50:10AM -0700, Paul E. McKenney wrote: > > > On Sat, Jul 13, 2019 at 11:36:06AM -0400, Joel Fernandes wrote: >

Re: [PATCH v2 3/9] rcu/sync: Remove custom check for reader-section

2019-07-14 Thread Joel Fernandes
On Sun, Jul 14, 2019 at 02:10:53PM -0400, Joel Fernandes wrote: > On Sat, Jul 13, 2019 at 02:28:12PM -0700, Paul E. McKenney wrote: [snip] > > > > > > > > > > > > > > > > > > Cc: Oleg Nesterov

Re: [PATCH 7/9] x86/pci: Pass lockdep condition to pcm_mmcfg_list iterator (v1)

2019-07-15 Thread Joel Fernandes
On Mon, Jul 15, 2019 at 03:02:35PM -0500, Bjorn Helgaas wrote: > On Mon, Jul 15, 2019 at 10:37:03AM -0400, Joel Fernandes (Google) wrote: > > The pcm_mmcfg_list is traversed with list_for_each_entry_rcu without a > > reader-lock held, because the pci_mmcfg_lock is already held. Make

Re: [PATCH v2 2/9] rcu: Add support for consolidated-RCU reader checking

2019-07-16 Thread Joel Fernandes
On Tue, Jul 16, 2019 at 11:22:37AM -0700, Paul E. McKenney wrote: > On Fri, Jul 12, 2019 at 01:00:17PM -0400, Joel Fernandes (Google) wrote: > > This patch adds support for checking RCU reader sections in list > > traversal macros. Optionally, if the list macro is called under SR

Re: [PATCH 2/9] rcu: Add support for consolidated-RCU reader checking (v3)

2019-07-16 Thread Joel Fernandes
On Tue, Jul 16, 2019 at 11:38:33AM -0700, Paul E. McKenney wrote: > On Mon, Jul 15, 2019 at 10:36:58AM -0400, Joel Fernandes (Google) wrote: > > This patch adds support for checking RCU reader sections in list > > traversal macros. Optionally, if the list macro is called under SR

Re: [PATCH 2/9] rcu: Add support for consolidated-RCU reader checking (v3)

2019-07-16 Thread Joel Fernandes
On Tue, Jul 16, 2019 at 11:53:03AM -0700, Paul E. McKenney wrote: [snip] > > > A few more things below. > > > > --- > > > > include/linux/rculist.h | 28 - > > > > include/linux/rcupdate.h | 7 +++ > > > > kernel/rcu/Kconfig.debug | 11 ++ > > > > kernel/rcu/u

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-23 Thread Joel Fernandes
On Tue, Jul 23, 2019 at 01:10:05PM +0300, Konstantin Khlebnikov wrote: > On 23.07.2019 11:43, Konstantin Khlebnikov wrote: > > On 23.07.2019 0:32, Joel Fernandes (Google) wrote: > > > The page_idle tracking feature currently requires looking up the pagemap > > >

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-23 Thread Joel Fernandes
On Tue, Jul 23, 2019 at 03:13:58PM +0900, Minchan Kim wrote: > Hi Joel, > > On Mon, Jul 22, 2019 at 05:32:04PM -0400, Joel Fernandes (Google) wrote: > > The page_idle tracking feature currently requires looking up the pagemap > > for a process followed by interacting with /sy

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-23 Thread Joel Fernandes
On Tue, Jul 23, 2019 at 08:05:25AM +0200, Michal Hocko wrote: > [Cc linux-api - please always do CC this list when introducing a user > visible API] Sorry, will do. > On Mon 22-07-19 17:32:04, Joel Fernandes (Google) wrote: > > The page_idle tracking feature currently requires

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-23 Thread Joel Fernandes
On Mon, Jul 22, 2019 at 03:06:39PM -0700, Andrew Morton wrote: > On Mon, 22 Jul 2019 17:32:04 -0400 "Joel Fernandes (Google)" > wrote: > > > The page_idle tracking feature currently requires looking up the pagemap > > for a process followed by interacting with /sy

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-24 Thread Joel Fernandes
On Wed, Jul 24, 2019 at 01:28:42PM +0900, Minchan Kim wrote: > On Tue, Jul 23, 2019 at 10:20:49AM -0400, Joel Fernandes wrote: > > On Tue, Jul 23, 2019 at 03:13:58PM +0900, Minchan Kim wrote: > > > Hi Joel, > > > > > > On Mon, Jul 22, 2019 at 05:32:04PM

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-24 Thread Joel Fernandes
s by doing a large read. This can potentially exhaust page > reserves which things like networking Rx interrupts need and can make > this whole feature less reliable. For the revision, I will pre-allocate the page nodes in advance so it does not need to do this. Diff on top of this patch is

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-25 Thread Joel Fernandes
On Thu, Jul 25, 2019 at 11:15:53AM +0300, Konstantin Khlebnikov wrote: [snip] > >>> Thanks for bringing up the swapping corner case.. Perhaps we can improve > >>> the heap profiler to detect this by looking at bits 0-4 in pagemap. While > >>> it > >> > >> Yeb, that could work but it could add ove

Re: [PATCH v1 1/2] mm/page_idle: Add support for per-pid page_idle using virtual indexing

2019-07-26 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 02:16:20PM +0300, Konstantin Khlebnikov wrote: > On 26.07.2019 3:06, Joel Fernandes wrote: > > On Thu, Jul 25, 2019 at 11:15:53AM +0300, Konstantin Khlebnikov wrote: > > [snip] > > > > > > Thanks for bringing up the swapp

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-26 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 02:00:28PM -0300, Mauro Carvalho Chehab wrote: > Hi Joel, > > Em Fri, 26 Jul 2019 12:20:02 -0400 > Joel Fernandes escreveu: > > > On Fri, Jul 26, 2019 at 09:51:35AM -0300, Mauro Carvalho Chehab wrote: > > > There are 4 RCU articles t

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-26 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 09:51:35AM -0300, Mauro Carvalho Chehab wrote: [snip] > +| until the assignment to ``gp``, by which time both fields are fully | > +| initialized. So reordering the assignments to ``p->a`` and ``p->b`` | > +| cannot possibly cause any problems.

Re: [PATCH v3 2/2] doc: Update documentation for page_idle virtual address indexing

2019-07-26 Thread Joel Fernandes
dle. I think it will also be considerably faster. Cool, glad to know. > On Fri, Jul 26, 2019 at 11:23:19AM -0400, Joel Fernandes (Google) wrote: > > This patch updates the documentation with the new page_idle tracking > > feature which uses virtual address indexing. > >

Re: [PATCH] tools: memory-model: add it to the Documentation body

2019-07-27 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 04:01:37PM -0300, Mauro Carvalho Chehab wrote: > The books at tools/memory-model/Documentation are very well > formatted. Congrats to the ones that wrote them! > > The manual conversion to ReST is really trivial: > > - Add document titles; > - change the bullet

Re: [PATCH v3 1/2] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-07-30 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 11:23 AM Joel Fernandes (Google) wrote: > > The page_idle tracking feature currently requires looking up the pagemap > for a process followed by interacting with /sys/kernel/mm/page_idle. > Looking up PFN from pagemap in Android devices is not supported by &g

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-30 Thread Joel Fernandes
On Tue, Jul 30, 2019 at 02:22:50PM -0700, Paul E. McKenney wrote: > On Fri, Jul 26, 2019 at 09:51:35AM -0300, Mauro Carvalho Chehab wrote: > > There are 4 RCU articles that are written on html format. > > > > The way they are, they can't be part of the Linux Kernel > > documentation body nor share

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-30 Thread Joel Fernandes
On Fri, Jul 26, 2019 at 04:14:05PM -0300, Mauro Carvalho Chehab wrote: > Em Fri, 26 Jul 2019 14:02:01 -0400 > Joel Fernandes escreveu: > > > On Fri, Jul 26, 2019 at 09:51:35AM -0300, Mauro Carvalho Chehab wrote: > > [snip] > > > +| until the assignment to ``gp``,

Re: [PATCH] tools: memory-model: add it to the Documentation body

2019-07-30 Thread Joel Fernandes
On Sat, Jul 27, 2019 at 12:37:54PM -0300, Mauro Carvalho Chehab wrote: > Em Sat, 27 Jul 2019 14:14:53 + > Joel Fernandes escreveu: > > > On Fri, Jul 26, 2019 at 04:01:37PM -0300, Mauro Carvalho Chehab wrote: > > > The books at tools/memory-model/Documentation are v

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-30 Thread Joel Fernandes
On Tue, Jul 30, 2019 at 07:00:28PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 30 Jul 2019 17:50:07 -0400 > Joel Fernandes escreveu: > > > On Tue, Jul 30, 2019 at 02:22:50PM -0700, Paul E. McKenney wrote: > > > On Fri, Jul 26, 2019 at 09:51:35AM -0300, Mau

Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST

2019-07-30 Thread Joel Fernandes
On Tue, Jul 30, 2019 at 08:00:57PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 30 Jul 2019 18:21:30 -0400 > Joel Fernandes escreveu: > > > On Tue, Jul 30, 2019 at 07:00:28PM -0300, Mauro Carvalho Chehab wrote: > > > Em Tue, 30 Jul 2019 17:50:07 -0400 > &

Re: [PATCH v3 1/2] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-07-31 Thread Joel Fernandes
On Wed, Jul 31, 2019 at 05:53:35PM +0900, Minchan Kim wrote: > Hi Joel, > > On Fri, Jul 26, 2019 at 11:23:18AM -0400, Joel Fernandes (Google) wrote: > > The page_idle tracking feature currently requires looking up the pagemap > > for a process followed by interacting with /sy

Re: [PATCH v3 1/2] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-08-05 Thread Joel Fernandes
On Mon, Aug 05, 2019 at 04:55:47PM +0900, Minchan Kim wrote: > Hi Joel, Hi Minchan, > On Wed, Jul 31, 2019 at 01:19:37PM -0400, Joel Fernandes wrote: > > > > -static struct page *page_idle_get_page(unsigned long pfn) > > > > +static struct page *page_idle

Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 10:42:03AM +0200, Michal Hocko wrote: > On Mon 05-08-19 13:04:49, Joel Fernandes (Google) wrote: > > This bit will be used by idle page tracking code to correctly identify > > if a page that was swapped out was idle before it got swapped out. > > Wit

Re: [PATCH v4 4/5] page_idle: Drain all LRU pagevec before idle tracking

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 10:43:57AM +0200, Michal Hocko wrote: > On Mon 05-08-19 13:04:50, Joel Fernandes (Google) wrote: > > During idle tracking, we see that sometimes faulted anon pages are in > > pagevec but are not drained to LRU. Idle tracking considers pages only > > on

Re: [PATCH v4 1/5] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 10:56:05AM +0200, Michal Hocko wrote: > On Mon 05-08-19 13:04:47, Joel Fernandes (Google) wrote: > > The page_idle tracking feature currently requires looking up the pagemap > > for a process followed by interacting with /sys/kernel/mm/page_idle. > >

Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 12:47:55PM +0200, Michal Hocko wrote: > On Tue 06-08-19 06:36:27, Joel Fernandes wrote: > > On Tue, Aug 06, 2019 at 10:42:03AM +0200, Michal Hocko wrote: > > > On Mon 05-08-19 13:04:49, Joel Fernandes (Google) wrote: > > > > This bit will be u

Re: [PATCH v4 4/5] page_idle: Drain all LRU pagevec before idle tracking

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 12:51:49PM +0200, Michal Hocko wrote: > On Tue 06-08-19 06:45:54, Joel Fernandes wrote: > > On Tue, Aug 06, 2019 at 10:43:57AM +0200, Michal Hocko wrote: > > > On Mon 05-08-19 13:04:50, Joel Fernandes (Google) wrote: > > > > During idle t

Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 01:14:52PM +0200, Michal Hocko wrote: > On Tue 06-08-19 20:07:37, Minchan Kim wrote: > > On Tue, Aug 06, 2019 at 12:47:55PM +0200, Michal Hocko wrote: > > > On Tue 06-08-19 06:36:27, Joel Fernandes wrote: > > > > On Tue, Aug 06, 2019 at 10:42:

Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 01:57:03PM +0200, Michal Hocko wrote: > On Tue 06-08-19 07:14:46, Joel Fernandes wrote: > > On Tue, Aug 06, 2019 at 12:47:55PM +0200, Michal Hocko wrote: > > > On Tue 06-08-19 06:36:27, Joel Fernandes wrote: > > > > On Tue, Aug 06, 2019 at

Re: [PATCH v4 4/5] page_idle: Drain all LRU pagevec before idle tracking

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 01:44:02PM +0200, Michal Hocko wrote: [snip] > > > > This operation even if expensive is only done once during the access of > > > > the > > > > page_idle file. Did you have a better fix in mind? > > > > > > Can we set the idle bit also for non-lru pages as long as they ar

Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE

2019-08-06 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 11:47:47PM +0900, Minchan Kim wrote: > On Tue, Aug 06, 2019 at 01:57:03PM +0200, Michal Hocko wrote: > > On Tue 06-08-19 07:14:46, Joel Fernandes wrote: > > > On Tue, Aug 06, 2019 at 12:47:55PM +0200, Michal Hocko wrote: > > > > On Tue 06-

Re: [PATCH v4 1/5] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-08-07 Thread Joel Fernandes
On Tue, Aug 06, 2019 at 03:19:21PM -0700, Andrew Morton wrote: > (cc Brendan's other email address, hoping for review input ;)) ;) > On Mon, 5 Aug 2019 13:04:47 -0400 "Joel Fernandes (Google)" > wrote: > > > The page_idle tracking feature currently requires

Re: [PATCH v4 1/5] mm/page_idle: Add per-pid idle page tracking using virtual indexing

2019-08-07 Thread Joel Fernandes
On Wed, Aug 07, 2019 at 01:01:22PM -0700, Andrew Morton wrote: > On Wed, 7 Aug 2019 06:00:13 -0400 Joel Fernandes > wrote: > > > > > 8 files changed, 376 insertions(+), 45 deletions(-) > > > > > > Quite a lot of new code unconditionally added to major

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-07 Thread Joel Fernandes
On Wed, Aug 07, 2019 at 01:04:02PM -0700, Andrew Morton wrote: > On Wed, 7 Aug 2019 13:15:54 -0400 "Joel Fernandes (Google)" > wrote: > > > In Android, we are using this for the heap profiler (heapprofd) which > > profiles and pin points code paths which alloc

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-07 Thread Joel Fernandes
On Wed, Aug 07, 2019 at 01:58:40PM -0700, Andrew Morton wrote: > On Wed, 7 Aug 2019 16:45:30 -0400 Joel Fernandes > wrote: > > > On Wed, Aug 07, 2019 at 01:04:02PM -0700, Andrew Morton wrote: > > > On Wed, 7 Aug 2019 13:15:54 -0400 "Joel Fernandes (Google)"

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-07 Thread Joel Fernandes
On Wed, Aug 07, 2019 at 05:31:05PM -0400, Joel Fernandes wrote: > On Wed, Aug 07, 2019 at 01:58:40PM -0700, Andrew Morton wrote: > > On Wed, 7 Aug 2019 16:45:30 -0400 Joel Fernandes > > wrote: > > > > > On Wed, Aug 07, 2019 at 01:04:02PM -0700, Andrew Morton wrot

Re: [PATCH 1/3] workqueue: Convert for_each_wq to use built-in list check (v2)

2019-08-11 Thread Joel Fernandes
On Sun, Aug 11, 2019 at 6:11 PM Joel Fernandes (Google) wrote: > > list_for_each_entry_rcu now has support to check for RCU reader sections > as well as lock. Just use the support in it, instead of explicitly > checking in the caller. > > Signed-off-by: Joel Fernandes (Google)

Re: [PATCH 3/3] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-12 Thread Joel Fernandes
On Mon, Aug 12, 2019 at 07:02:56AM +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 11, 2019 at 06:11:11PM -0400, Joel Fernandes (Google) wrote: > > Properly check if lockdep lock checking is disabled at config time. If > > so, then lock_is_held() is undefined so don't do any che

Re: [PATCH v2 1/2] rcu/tree: Add basic support for kfree_rcu batching

2019-08-12 Thread Joel Fernandes
On Mon, Aug 12, 2019 at 07:29:17PM +0900, Byungchul Park wrote: [snip] > > diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h > > index 8e727f57d814..383f2481750f 100644 > > --- a/include/linux/rcutiny.h > > +++ b/include/linux/rcutiny.h > > @@ -39,6 +39,11 @@ static inline void kfree_c

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-12 Thread Joel Fernandes
On Thu, Aug 08, 2019 at 10:00:44AM +0200, Michal Hocko wrote: > On Wed 07-08-19 17:31:05, Joel Fernandes wrote: > > On Wed, Aug 07, 2019 at 01:58:40PM -0700, Andrew Morton wrote: > > > On Wed, 7 Aug 2019 16:45:30 -0400 Joel Fernandes > > > wrote: > > > > &

Re: [PATCH 3/3] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-12 Thread Joel Fernandes
On Mon, Aug 12, 2019 at 02:11:19PM -0400, Steven Rostedt wrote: > On Mon, 12 Aug 2019 09:03:10 -0400 > Joel Fernandes wrote: > > > > > > drivers/base/core.c | 6 +- > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > &g

Re: [PATCH 2/3] doc: Update documentation about list_for_each_entry_rcu (v1)

2019-08-12 Thread Joel Fernandes
On Mon, Aug 12, 2019 at 01:22:41PM -0700, Paul E. McKenney wrote: > On Sun, Aug 11, 2019 at 06:11:10PM -0400, Joel Fernandes (Google) wrote: > > This patch updates the documentation with information about > > usage of lockdep with list_for_each_entry_rcu(). > > > > Si

Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 08:05:40AM +0200, Greg Kroah-Hartman wrote: > On Mon, Aug 12, 2019 at 05:49:17PM -0400, Joel Fernandes (Google) wrote: > > Check if lockdep lock checking is disabled. If so, then do not define > > device_links_read_lock_held(). It is used only from place

Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 09:39:05AM -0400, Joel Fernandes wrote: [snip] > > > drivers/base/core.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > > index 32cf83d1

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 11:14:30AM +0200, Michal Hocko wrote: > On Mon 12-08-19 10:56:20, Joel Fernandes wrote: > > On Thu, Aug 08, 2019 at 10:00:44AM +0200, Michal Hocko wrote: > > > On Wed 07-08-19 17:31:05, Joel Fernandes wrote: > > > > On Wed, Aug 07, 2019 at 0

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 12:08:56PM +0200, Michal Hocko wrote: > On Mon 12-08-19 20:14:38, Jann Horn wrote: > > On Wed, Aug 7, 2019 at 7:16 PM Joel Fernandes (Google) > > wrote: > > > The page_idle tracking feature currently requires looking up the pagemap > &g

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 04:14:32PM +0200, Michal Hocko wrote: [snip] > > > If the API is flawed then this is likely going > > > to kick us later and will be hard to fix. I am still not convinced about > > > the swap part of the thing TBH. > > > > Ok, then let us discuss it. As I mentioned before,

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-13 Thread Joel Fernandes
On Mon, Aug 12, 2019 at 08:14:38PM +0200, Jann Horn wrote: [snip] > > +/* Helper to get the start and end frame given a pos and count */ > > +static int page_idle_get_frames(loff_t pos, size_t count, struct mm_struct > > *mm, > > + unsigned long *start, unsigned long

Re: [PATCH v5 2/6] mm/page_idle: Add support for handling swapped PG_Idle pages

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 05:04:50PM +0200, Michal Hocko wrote: > On Wed 07-08-19 13:15:55, Joel Fernandes (Google) wrote: > > Idle page tracking currently does not work well in the following > > scenario: > > 1. mark page-A idle which was present at that time. > > 2.

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 05:34:16PM +0200, Daniel Gruss wrote: > On 8/13/19 5:29 PM, Jann Horn wrote: > > On Tue, Aug 13, 2019 at 12:09 PM Michal Hocko wrote: > >> On Mon 12-08-19 20:14:38, Jann Horn wrote: > >>> On Wed, Aug 7, 2019 at 7:16 PM Joel Fernandes (Go

Re: [PATCH v3 1/2] rcu/tree: Add basic support for kfree_rcu batching

2019-08-14 Thread Joel Fernandes
[1] > > http://lore.kernel.org/lkml/20190723035725-mutt-send-email-...@kernel.org > > [2] https://lkml.org/lkml/2017/12/19/824 > > > > Cc: Rao Shoaib > > Cc: max.byungchul.p...@gmail.com > > Cc: byungchul.p...@lge.com > > Cc: kernel-t...@an

Re: [PATCH v5 2/6] mm/page_idle: Add support for handling swapped PG_Idle pages

2019-08-14 Thread Joel Fernandes
On Wed, Aug 14, 2019 at 10:05:31AM +0200, Michal Hocko wrote: > On Tue 13-08-19 11:36:59, Joel Fernandes wrote: > > On Tue, Aug 13, 2019 at 05:04:50PM +0200, Michal Hocko wrote: > > > On Wed 07-08-19 13:15:55, Joel Fernandes (Google) wrote: > > > > Idle page trackin

Re: [PATCH v3 1/2] rcu/tree: Add basic support for kfree_rcu batching

2019-08-14 Thread Joel Fernandes
On Wed, Aug 14, 2019 at 10:38:17AM -0400, Joel Fernandes wrote: > On Tue, Aug 13, 2019 at 12:07:38PM -0700, Paul E. McKenney wrote: [snip] > > > - * Queue an RCU callback for lazy invocation after a grace period. > > > - * This will likely be later named somethin

Re: [PATCH v3 1/2] rcu/tree: Add basic support for kfree_rcu batching

2019-08-14 Thread Joel Fernandes
On Wed, Aug 14, 2019 at 11:44:29AM -0700, Paul E. McKenney wrote: > On Wed, Aug 14, 2019 at 01:22:33PM -0400, Joel Fernandes wrote: > > On Wed, Aug 14, 2019 at 10:38:17AM -0400, Joel Fernandes wrote: > > > On Tue, Aug 13, 2019 at 12:07:38PM -0700, Paul E. McKenney

Re: [PATCH 1/3] workqueue: Convert for_each_wq to use built-in list check (v2)

2019-08-14 Thread Joel Fernandes
On Wed, Aug 14, 2019 at 12:48:41PM -0700, Tejun Heo wrote: > Hello, Joel. > > On Sun, Aug 11, 2019 at 06:11:09PM -0400, Joel Fernandes (Google) wrote: > > list_for_each_entry_rcu now has support to check for RCU reader sections > > as well as lock. Just use the supp

Re: [PATCH v3 -rcu] workqueue: Convert for_each_wq to use built-in list check

2019-08-15 Thread Joel Fernandes
On Thu, Aug 15, 2019 at 07:57:49AM -0700, Matthew Wilcox wrote: > On Thu, Aug 15, 2019 at 10:18:42AM -0400, Joel Fernandes (Google) wrote: > > list_for_each_entry_rcu now has support to check for RCU reader sections > > as well as lock. Just use the support in it, instea

Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index

2019-08-19 Thread Joel Fernandes
On Wed, Aug 14, 2019 at 09:56:01AM +0200, Michal Hocko wrote: [snip] > > > > Can this be used to observe which library pages other processes are > > > > accessing, even if you don't have access to those processes, as long > > > > as you can map the same libraries? I realize that there are already a

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-26 Thread Joel Fernandes
On Mon, Aug 26, 2019 at 9:34 PM Joel Fernandes (Google) wrote: > > The dynticks_nmi_nesting counter serves 4 purposes: > And actually, I meant 3 purposes ;-) :-P thanks, - Joel > (a) rcu_is_cpu_rrupt_from_idle() needs to be able to detect first > interrup

Re: [PATCH 2/5] rcu/tree: Add multiple in-flight batches of kfree_rcu work

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 07:52:53AM +0800, Boqun Feng wrote: > Hi Joel, > > On Tue, Aug 27, 2019 at 03:01:56PM -0400, Joel Fernandes (Google) wrote: > > During testing, it was observed that amount of memory consumed due > > kfree_rcu() batching is 300-400MB. Previously

Re: [PATCH 0/5] kfree_rcu() additions for -rcu

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 01:28:08PM -0700, Paul E. McKenney wrote: > On Tue, Aug 27, 2019 at 03:01:54PM -0400, Joel Fernandes (Google) wrote: > > Hi, > > > > This is a series on top of the patch "rcu/tree: Add basic support for > > kfree_rcu() batching". &g

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 01:23:30PM -0700, Paul E. McKenney wrote: > On Mon, Aug 26, 2019 at 09:33:54PM -0400, Joel Fernandes (Google) wrote: > > The dynticks_nmi_nesting counter serves 4 purposes: > > > > (a) rcu_is_cpu_rrupt_from_idle() needs to be

Re: [PATCH 0/5] kfree_rcu() additions for -rcu

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 01:46:24PM -0700, Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 04:34:58PM -0400, Joel Fernandes wrote: > > On Wed, Aug 28, 2019 at 01:28:08PM -0700, Paul E. McKenney wrote: > > > On Tue, Aug 27, 2019 at 03:01:54PM -0400, Joel Fernandes (Google)

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 02:19:04PM -0700, Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 05:05:25PM -0400, Joel Fernandes wrote: > > On Wed, Aug 28, 2019 at 01:23:30PM -0700, Paul E. McKenney wrote: > > > On Mon, Aug 26, 2019 at 09:33:54PM -0400, Joel Fernandes (Google)

Re: [PATCH 3/5] rcu/tree: Add support for debug_objects debugging for kfree_rcu()

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 02:31:19PM -0700, Paul E. McKenney wrote: > On Tue, Aug 27, 2019 at 03:01:57PM -0400, Joel Fernandes (Google) wrote: > > Make use of RCU's debug_objects debugging support > > (CONFIG_DEBUG_OBJECTS_RCU_HEAD) similar to call_rcu() and other flavors. >

Re: [RFC v1 1/2] rcu/tree: Clean up dynticks counter usage

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 01:13:44PM -0700, Paul E. McKenney wrote: > On Mon, Aug 26, 2019 at 09:33:53PM -0400, Joel Fernandes (Google) wrote: > > The dynticks counter are confusing due to crowbar writes of > > DYNTICK_IRQ_NONIDLE whose purpose is to detect half-interrupts (

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 03:01:08PM -0700, Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 05:42:41PM -0400, Joel Fernandes wrote: > > On Wed, Aug 28, 2019 at 02:19:04PM -0700, Paul E. McKenney wrote: > > > On Wed, Aug 28, 2019 at 05:05:25PM -0400, Joel Fernandes wrote: >

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-28 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 04:12:47PM -0700, Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 06:14:44PM -0400, Joel Fernandes wrote: > > On Wed, Aug 28, 2019 at 03:01:08PM -0700, Paul E. McKenney wrote: > > > On Wed, Aug 28, 2019 at 05:42:41PM -0400, Joel Fernandes wrote: >

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 08:43:36PM -0700, Paul E. McKenney wrote: [snip] > On the tracing patch... That patch might be a good idea regardless, > but I bet that the reason that you felt the sudden need for it was due > to the loss of information in your eventual ->dynticks_nesting field. > After a

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 08:43:36PM -0700, Paul E. McKenney wrote: [snip] > > > > > This change is not fixing a bug, so there is no need for an emergency > > > > > fix, > > > > > and thus no point in additional churn. I understand that it is a bit > > > > > annoying to code and test something and

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
On Thu, Aug 29, 2019 at 10:43:55AM -0400, Joel Fernandes wrote: > On Wed, Aug 28, 2019 at 08:43:36PM -0700, Paul E. McKenney wrote: > [snip] > > > > > > This change is not fixing a bug, so there is no need for an > > > > > > emergency fix, > > &

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
On Thu, Aug 29, 2019 at 09:13:01AM -0700, Paul E. McKenney wrote: > On Thu, Aug 29, 2019 at 11:13:25AM -0400, Joel Fernandes wrote: > > On Thu, Aug 29, 2019 at 10:43:55AM -0400, Joel Fernandes wrote: > > > On Wed, Aug 28, 2019 at 08:43:36PM -0700, Paul E. McKenney

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
Hi Paul, On Thu, Aug 29, 2019 at 09:54:07AM -0700, Paul E. McKenney wrote: > On Thu, Aug 29, 2019 at 09:21:46AM -0700, Andy Lutomirski wrote: > > On Thu, Aug 29, 2019 at 9:10 AM Paul E. McKenney wrote: > > > > > > On Thu, Aug 29, 2019 at 10:43:55AM

Re: [PATCH 1/5] rcu/rcuperf: Add kfree_rcu() performance Tests

2019-08-29 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 02:12:26PM -0700, Paul E. McKenney wrote: > On Tue, Aug 27, 2019 at 03:01:55PM -0400, Joel Fernandes (Google) wrote: > > This test runs kfree_rcu() in a loop to measure performance of the new > > kfree_rcu() batching functionality. > > > > The fo

Re: [PATCH v2] rcu/tree: Add multiple in-flight batches of kfree_rcu work

2019-08-29 Thread Joel Fernandes
On Wed, Aug 28, 2019 at 01:45:21PM -0700, Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 10:09:52AM -0400, Joel Fernandes (Google) wrote: > > During testing, it was observed that amount of memory consumed due > > kfree_rcu() batching is 300-400MB. Previously we had only a singl

Re: [PATCH 4/5] rcu: Remove kfree_rcu() special casing and lazy handling

2019-08-29 Thread Joel Fernandes
All comments addressed on this one, thanks! - Joel On Wed, Aug 28, 2019 at 02:46:29PM -0700, Paul E. McKenney wrote: > On Tue, Aug 27, 2019 at 03:01:58PM -0400, Joel Fernandes (Google) wrote: > > Remove kfree_rcu() special casing and lazy handling from RCU. > > For Tiny

Re: [PATCH 5/5] rcu: Remove kfree_call_rcu_nobatch()

2019-08-29 Thread Joel Fernandes
Hi Paul, I think this is the only contentious patch preventing my resend of the series, let me know what you think, I replied below: On Wed, Aug 28, 2019 at 02:56:36PM -0700, Paul E. McKenney wrote: > On Tue, Aug 27, 2019 at 03:01:59PM -0400, Joel Fernandes (Google) wrote: [snip] > > d

Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter

2019-08-29 Thread Joel Fernandes
On Thu, Aug 29, 2019 at 05:47:56PM -0700, Paul E. McKenney wrote: [snip] > > > > Paul, also what what happens in the following scenario: > > > > > > > > CPU0 CPU1 > > > > > > > > A syscall causes rcu_eqs_exit() > > > > rcu_read_lock(); > > > >

Re: [PATCH 1/5] rcu/rcuperf: Add kfree_rcu() performance Tests

2019-09-03 Thread Joel Fernandes
On Tue, Sep 03, 2019 at 01:08:49PM -0700, Paul E. McKenney wrote: > On Thu, Aug 29, 2019 at 04:56:37PM -0400, Joel Fernandes wrote: > > On Wed, Aug 28, 2019 at 02:12:26PM -0700, Paul E. McKenney wrote: > > [ . . . ] > > > > > +static int > &

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-05 Thread Joel Fernandes
On Mon, Mar 04, 2019 at 11:48:52PM +0100, Dietmar Eggemann wrote: > On 3/1/19 5:08 PM, Joel Fernandes (Google) wrote: > > Introduce in-kernel headers and other artifacts which are made available > > as an archive through proc (/proc/kheaders.tar.xz file). This archive makes >

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-05 Thread Joel Fernandes
On Mon, Mar 04, 2019 at 02:00:59PM +, Qais Yousef wrote: > On 03/01/19 11:08, Joel Fernandes (Google) wrote: > > Introduce in-kernel headers and other artifacts which are made available > > as an archive through proc (/proc/kheaders.tar.xz file). This archive makes > >

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-06 Thread Joel Fernandes
Hi Masahiro, Thanks for review, my replies are inline: On Wed, Mar 06, 2019 at 09:26:14PM +0900, Masahiro Yamada wrote: > On Mon, Mar 4, 2019 at 1:15 AM Joel Fernandes wrote: > > > > This report is for an older version of the patch so ignore it. The > > issue is already res

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-06 Thread Joel Fernandes
next-20190301] > > [if your patch is applied to the wrong git tree, please drop us a note to > > help improve the system] > > > > url: > > https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/Provide-in-kernel-headers-for-making-it-easy-to-extend-the-kern

Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

2019-03-06 Thread Joel Fernandes
On Wed, Mar 06, 2019 at 04:07:13PM -0800, H. Peter Anvin wrote: > On 3/6/19 3:37 PM, Daniel Colascione wrote: > > > > I just don't get the opposition to Joel's work. The rest of the thread > > already goes into detail about the problems with pure-filesystem > > solutions, and you and others are ju

Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

2019-03-06 Thread Joel Fernandes
On Thu, Mar 07, 2019 at 01:42:45AM +0100, Enrico Weigelt, metux IT consult wrote: > On 07.03.19 00:09, Pavel Machek wrote: > > > So your licensing requirements prevent you from having headers in the > > filesystem, but allow module with the headers hidden inside on the > > filesystem? > > Maybe

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-07 Thread Joel Fernandes
x27;t work but I tried your one liner and it does work. Below is the updated patch with this and all the other nits addressed including the module.lds one. About module.lds for ia64 architecture, sorry to miss that - I did not test all architectures, just arm64 and x86 which I have hardware for. Int

  1   2   3   >