All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Christoph Lameter <cl@linux.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Michal Hocko <mhocko@kernel.org>, Tejun Heo <htejun@gmail.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org,
	David Rientjes <rientjes@google.com>,
	oleg@redhat.com, kwalker@redhat.com, akpm@linux-foundation.org,
	hannes@cmpxchg.org, vdavydov@parallels.com, skozina@redhat.com,
	mgorman@suse.de, riel@redhat.com
Subject: Re: Make vmstat deferrable again (was Re: [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks)
Date: Fri, 23 Oct 2015 23:49:28 +0900	[thread overview]
Message-ID: <20151023144928.GA455@swordfish> (raw)
In-Reply-To: <alpine.DEB.2.20.1510230910370.12801@east.gentwo.org>

On (10/23/15 09:12), Christoph Lameter wrote:
[..]
> > > +		if (!cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off))
> > > +			cancel_delayed_work(this_cpu_ptr(&vmstat_work));
> >
> > shouldn't preemption be disable for smp_processor_id() here?
> 
> Preemption is disabled when quiet_vmstat() is called.
> 

cond_resched()

[   29.607725] BUG: sleeping function called from invalid context at mm/vmstat.c:487
[   29.607729] in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/7
[   29.607731] no locks held by swapper/7/0.
[   29.607732] irq event stamp: 48932
[   29.607733] hardirqs last  enabled at (48931): [<ffffffff813b246a>] _raw_spin_unlock_irq+0x2c/0x37
[   29.607739] hardirqs last disabled at (48932): [<ffffffff810a3fec>] tick_nohz_idle_enter+0x3c/0x5f
[   29.607743] softirqs last  enabled at (48924): [<ffffffff81041fd8>] __do_softirq+0x2bb/0x3a9
[   29.607747] softirqs last disabled at (48893): [<ffffffff810422a7>] irq_exit+0x41/0x95
[   29.607752] CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.3.0-rc6-next-20151022-dbg-00003-g01184ff-dirty #261
[   29.607754]  0000000000000000 ffff88041dae7da0 ffffffff811dd4f3 ffff88041dacd100
[   29.607756]  ffff88041dae7dc8 ffffffff8105f144 ffffffff8169f800 0000000000000000
[   29.607759]  0000000000000007 ffff88041dae7e70 ffffffff811040b1 0000000000000002
[   29.607761] Call Trace:
[   29.607767]  [<ffffffff811dd4f3>] dump_stack+0x4b/0x63
[   29.607770]  [<ffffffff8105f144>] ___might_sleep+0x1e7/0x1ee
[   29.607773]  [<ffffffff811040b1>] refresh_cpu_vm_stats+0x8b/0xb5
[   29.607776]  [<ffffffff81104f4c>] quiet_vmstat+0x3a/0x41
[   29.607778]  [<ffffffff810a3ccf>] __tick_nohz_idle_enter+0x292/0x410
[   29.607781]  [<ffffffff810a4007>] tick_nohz_idle_enter+0x57/0x5f
[   29.607784]  [<ffffffff81076d8b>] cpu_startup_entry+0x36/0x330
[   29.607788]  [<ffffffff81028821>] start_secondary+0xf3/0xf6



by the way, tick_nohz_stop_sched_tick() receives cpu from __tick_nohz_idle_enter().
do you want to pass it to quiet_vmstat()?

	if (!ts->tick_stopped) {
		nohz_balance_enter_idle(cpu);
-		quiet_vmstat();
+		quiet_vmstat(cpu);
		calc_load_enter_idle();

	-ss

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Christoph Lameter <cl@linux.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Michal Hocko <mhocko@kernel.org>, Tejun Heo <htejun@gmail.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org,
	David Rientjes <rientjes@google.com>,
	oleg@redhat.com, kwalker@redhat.com, akpm@linux-foundation.org,
	hannes@cmpxchg.org, vdavydov@parallels.com, skozina@redhat.com,
	mgorman@suse.de, riel@redhat.com
Subject: Re: Make vmstat deferrable again (was Re: [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks)
Date: Fri, 23 Oct 2015 23:49:28 +0900	[thread overview]
Message-ID: <20151023144928.GA455@swordfish> (raw)
In-Reply-To: <alpine.DEB.2.20.1510230910370.12801@east.gentwo.org>

On (10/23/15 09:12), Christoph Lameter wrote:
[..]
> > > +		if (!cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off))
> > > +			cancel_delayed_work(this_cpu_ptr(&vmstat_work));
> >
> > shouldn't preemption be disable for smp_processor_id() here?
> 
> Preemption is disabled when quiet_vmstat() is called.
> 

cond_resched()

[   29.607725] BUG: sleeping function called from invalid context at mm/vmstat.c:487
[   29.607729] in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/7
[   29.607731] no locks held by swapper/7/0.
[   29.607732] irq event stamp: 48932
[   29.607733] hardirqs last  enabled at (48931): [<ffffffff813b246a>] _raw_spin_unlock_irq+0x2c/0x37
[   29.607739] hardirqs last disabled at (48932): [<ffffffff810a3fec>] tick_nohz_idle_enter+0x3c/0x5f
[   29.607743] softirqs last  enabled at (48924): [<ffffffff81041fd8>] __do_softirq+0x2bb/0x3a9
[   29.607747] softirqs last disabled at (48893): [<ffffffff810422a7>] irq_exit+0x41/0x95
[   29.607752] CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.3.0-rc6-next-20151022-dbg-00003-g01184ff-dirty #261
[   29.607754]  0000000000000000 ffff88041dae7da0 ffffffff811dd4f3 ffff88041dacd100
[   29.607756]  ffff88041dae7dc8 ffffffff8105f144 ffffffff8169f800 0000000000000000
[   29.607759]  0000000000000007 ffff88041dae7e70 ffffffff811040b1 0000000000000002
[   29.607761] Call Trace:
[   29.607767]  [<ffffffff811dd4f3>] dump_stack+0x4b/0x63
[   29.607770]  [<ffffffff8105f144>] ___might_sleep+0x1e7/0x1ee
[   29.607773]  [<ffffffff811040b1>] refresh_cpu_vm_stats+0x8b/0xb5
[   29.607776]  [<ffffffff81104f4c>] quiet_vmstat+0x3a/0x41
[   29.607778]  [<ffffffff810a3ccf>] __tick_nohz_idle_enter+0x292/0x410
[   29.607781]  [<ffffffff810a4007>] tick_nohz_idle_enter+0x57/0x5f
[   29.607784]  [<ffffffff81076d8b>] cpu_startup_entry+0x36/0x330
[   29.607788]  [<ffffffff81028821>] start_secondary+0xf3/0xf6



by the way, tick_nohz_stop_sched_tick() receives cpu from __tick_nohz_idle_enter().
do you want to pass it to quiet_vmstat()?

	if (!ts->tick_stopped) {
		nohz_balance_enter_idle(cpu);
-		quiet_vmstat();
+		quiet_vmstat(cpu);
		calc_load_enter_idle();

	-ss

  reply	other threads:[~2015-10-23 14:50 UTC|newest]

Thread overview: 122+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 12:26 [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks Tetsuo Handa
2015-10-21 12:26 ` Tetsuo Handa
2015-10-21 13:03 ` Michal Hocko
2015-10-21 13:03   ` Michal Hocko
2015-10-21 14:22 ` Christoph Lameter
2015-10-21 14:22   ` Christoph Lameter
2015-10-21 14:33   ` Michal Hocko
2015-10-21 14:33     ` Michal Hocko
2015-10-21 14:49     ` Christoph Lameter
2015-10-21 14:49       ` Christoph Lameter
2015-10-21 14:55       ` Michal Hocko
2015-10-21 14:55         ` Michal Hocko
2015-10-21 15:39         ` Tetsuo Handa
2015-10-21 15:39           ` Tetsuo Handa
2015-10-21 17:16         ` Christoph Lameter
2015-10-21 17:16           ` Christoph Lameter
2015-10-22 11:37           ` Tetsuo Handa
2015-10-22 11:37             ` Tetsuo Handa
2015-10-22 13:39             ` Christoph Lameter
2015-10-22 13:39               ` Christoph Lameter
2015-10-22 14:09               ` Tejun Heo
2015-10-22 14:09                 ` Tejun Heo
2015-10-22 14:21                 ` Tejun Heo
2015-10-22 14:21                   ` Tejun Heo
2015-10-22 14:23                   ` Christoph Lameter
2015-10-22 14:23                     ` Christoph Lameter
2015-10-22 14:24                     ` Tejun Heo
2015-10-22 14:24                       ` Tejun Heo
2015-10-22 14:25                       ` Christoph Lameter
2015-10-22 14:25                         ` Christoph Lameter
2015-10-22 14:33                         ` Tejun Heo
2015-10-22 14:33                           ` Tejun Heo
2015-10-22 14:41                           ` Christoph Lameter
2015-10-22 14:41                             ` Christoph Lameter
2015-10-22 15:14                             ` Tejun Heo
2015-10-22 15:14                               ` Tejun Heo
2015-10-23  4:26                               ` Tejun Heo
2015-10-23  4:26                                 ` Tejun Heo
2015-11-02 15:01                                 ` Michal Hocko
2015-11-02 15:01                                   ` Michal Hocko
2015-11-02 19:20                                   ` Tejun Heo
2015-11-02 19:20                                     ` Tejun Heo
2015-11-03  2:32                                     ` Tetsuo Handa
2015-11-03  2:32                                       ` Tetsuo Handa
2015-11-03 19:43                                       ` Tejun Heo
2015-11-03 19:43                                         ` Tejun Heo
2015-11-05 14:59                                   ` Tetsuo Handa
2015-11-05 14:59                                     ` Tetsuo Handa
2015-11-05 17:45                                     ` Christoph Lameter
2015-11-05 17:45                                       ` Christoph Lameter
2015-11-06  0:16                                       ` Tejun Heo
2015-11-06  0:16                                         ` Tejun Heo
2015-11-11 15:44                                         ` Michal Hocko
2015-11-11 15:44                                           ` Michal Hocko
2015-11-11 16:03                                           ` Michal Hocko
2015-11-11 16:03                                             ` Michal Hocko
2015-10-22 14:22                 ` Christoph Lameter
2015-10-22 14:22                   ` Christoph Lameter
2015-10-22 15:06                 ` Michal Hocko
2015-10-22 15:06                   ` Michal Hocko
2015-10-22 15:15                   ` Tejun Heo
2015-10-22 15:15                     ` Tejun Heo
2015-10-22 15:33                     ` Christoph Lameter
2015-10-22 15:33                       ` Christoph Lameter
2015-10-23  8:37                       ` Michal Hocko
2015-10-23  8:37                         ` Michal Hocko
2015-10-23 11:43                         ` Make vmstat deferrable again (was Re: [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks) Christoph Lameter
2015-10-23 11:43                           ` Christoph Lameter
2015-10-23 12:07                           ` Sergey Senozhatsky
2015-10-23 12:07                             ` Sergey Senozhatsky
2015-10-23 14:12                             ` Christoph Lameter
2015-10-23 14:12                               ` Christoph Lameter
2015-10-23 14:49                               ` Sergey Senozhatsky [this message]
2015-10-23 14:49                                 ` Sergey Senozhatsky
2015-10-23 16:10                                 ` Christoph Lameter
2015-10-23 16:10                                   ` Christoph Lameter
2015-10-22 15:35                     ` [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks Michal Hocko
2015-10-22 15:35                       ` Michal Hocko
2015-10-22 15:37                       ` Tejun Heo
2015-10-22 15:37                         ` Tejun Heo
2015-10-22 15:49                         ` Michal Hocko
2015-10-22 15:49                           ` Michal Hocko
2015-10-22 18:42                           ` Tejun Heo
2015-10-22 18:42                             ` Tejun Heo
2015-10-22 21:42                             ` [PATCH] mm,vmscan: Use accurate values for zone_reclaimable()checks Tetsuo Handa
2015-10-22 21:42                               ` Tetsuo Handa
2015-10-22 22:47                               ` Tejun Heo
2015-10-22 22:47                                 ` Tejun Heo
2015-10-23  8:36                               ` Michal Hocko
2015-10-23  8:36                                 ` Michal Hocko
2015-10-23 10:37                                 ` Tejun Heo
2015-10-23 10:37                                   ` Tejun Heo
2015-10-23  8:33                             ` [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks Michal Hocko
2015-10-23  8:33                               ` Michal Hocko
2015-10-23 10:36                               ` Tejun Heo
2015-10-23 10:36                                 ` Tejun Heo
2015-10-23 11:11                                 ` Michal Hocko
2015-10-23 11:11                                   ` Michal Hocko
2015-10-23 12:25                                   ` Tetsuo Handa
2015-10-23 12:25                                     ` Tetsuo Handa
2015-10-23 18:23                                     ` Tejun Heo
2015-10-23 18:23                                       ` Tejun Heo
2015-10-25 10:52                                       ` Tetsuo Handa
2015-10-25 10:52                                         ` Tetsuo Handa
2015-10-25 22:47                                         ` Tejun Heo
2015-10-25 22:47                                           ` Tejun Heo
2015-10-27  9:22                                         ` Michal Hocko
2015-10-27  9:22                                           ` Michal Hocko
2015-10-27 10:55                                           ` Tejun Heo
2015-10-27 10:55                                             ` Tejun Heo
2015-10-27 12:07                                             ` Michal Hocko
2015-10-27 12:07                                               ` Michal Hocko
2015-10-23 18:21                                   ` Tejun Heo
2015-10-23 18:21                                     ` Tejun Heo
2015-10-27  9:16                                     ` Michal Hocko
2015-10-27  9:16                                       ` Michal Hocko
2015-10-27 10:52                                       ` Tejun Heo
2015-10-27 10:52                                         ` Tejun Heo
2015-10-27 11:07                                       ` [PATCH] mm,vmscan: Use accurate values for zone_reclaimable()checks Tetsuo Handa
2015-10-27 11:07                                         ` Tetsuo Handa
2015-10-27 11:30                                         ` Tejun Heo
2015-10-27 11:30                                           ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151023144928.GA455@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hannes@cmpxchg.org \
    --cc=htejun@gmail.com \
    --cc=kwalker@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=oleg@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=skozina@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vdavydov@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.