All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] mm: cond_resched in tlb_flush_mmu to fix soft lockups on !CONFIG_PREEMPT
Date: Tue, 18 Dec 2012 13:01:09 -0500	[thread overview]
Message-ID: <50D0AF65.90701@redhat.com> (raw)
In-Reply-To: <1355847088-1207-1-git-send-email-mhocko@suse.cz>

On 12/18/2012 11:11 AM, Michal Hocko wrote:
> Since e303297 (mm: extended batches for generic mmu_gather) we are batching
> pages to be freed until either tlb_next_batch cannot allocate a new batch or we
> are done.
>
> This works just fine most of the time but we can get in troubles with
> non-preemptible kernel (CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY) on
> large machines where too aggressive batching might lead to soft lockups during
> process exit path (exit_mmap) because there are no scheduling points down the
> free_pages_and_swap_cache path and so the freeing can take long enough to
> trigger the soft lockup.
>
> The lockup is harmless except when the system is setup to panic on
> softlockup which is not that unusual.
>
> The simplest way to work around this issue is to explicitly cond_resched per
> batch in tlb_flush_mmu (1020 pages on x86_64).

> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: stable@vger.kernel.org # 3.0 and higher

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

--
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: Rik van Riel <riel@redhat.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] mm: cond_resched in tlb_flush_mmu to fix soft lockups on !CONFIG_PREEMPT
Date: Tue, 18 Dec 2012 13:01:09 -0500	[thread overview]
Message-ID: <50D0AF65.90701@redhat.com> (raw)
In-Reply-To: <1355847088-1207-1-git-send-email-mhocko@suse.cz>

On 12/18/2012 11:11 AM, Michal Hocko wrote:
> Since e303297 (mm: extended batches for generic mmu_gather) we are batching
> pages to be freed until either tlb_next_batch cannot allocate a new batch or we
> are done.
>
> This works just fine most of the time but we can get in troubles with
> non-preemptible kernel (CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY) on
> large machines where too aggressive batching might lead to soft lockups during
> process exit path (exit_mmap) because there are no scheduling points down the
> free_pages_and_swap_cache path and so the freeing can take long enough to
> trigger the soft lockup.
>
> The lockup is harmless except when the system is setup to panic on
> softlockup which is not that unusual.
>
> The simplest way to work around this issue is to explicitly cond_resched per
> batch in tlb_flush_mmu (1020 pages on x86_64).

> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: stable@vger.kernel.org # 3.0 and higher

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

  reply	other threads:[~2012-12-18 18:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 16:11 [PATCH] mm: cond_resched in tlb_flush_mmu to fix soft lockups on !CONFIG_PREEMPT Michal Hocko
2012-12-18 16:11 ` Michal Hocko
2012-12-18 18:01 ` Rik van Riel [this message]
2012-12-18 18:01   ` Rik van Riel
2012-12-18 22:02 ` Andrew Morton
2012-12-18 22:02   ` Andrew Morton
2012-12-18 23:50   ` Michal Hocko
2012-12-18 23:50     ` Michal Hocko
2012-12-19  0:00     ` Andrew Morton
2012-12-19  0:00       ` Andrew Morton
2012-12-19 15:04       ` [PATCH v2] mm: limit mmu_gather batching " Michal Hocko
2012-12-19 15:04         ` Michal Hocko
2012-12-19 21:13         ` Andrew Morton
2012-12-19 21:13           ` Andrew Morton
2012-12-20 10:24           ` Mel Gorman
2012-12-20 10:24             ` Mel Gorman
2012-12-20 12:47           ` Michal Hocko
2012-12-20 12:47             ` Michal Hocko
2012-12-20 20:27             ` Andrew Morton
2012-12-20 20:27               ` Andrew Morton
2012-12-20 22:36               ` [PATCH v3] " Michal Hocko
2012-12-20 22:36                 ` Michal Hocko
2012-12-21  8:09                 ` Michal Hocko
2012-12-21  8:09                   ` Michal Hocko
2013-04-27  7:50 ` [PATCH] mm: cond_resched in tlb_flush_mmu " Simon Jeons
2013-04-27  7:50   ` Simon Jeons

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=50D0AF65.90701@redhat.com \
    --to=riel@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    /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.