mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tong Tiangen <tongtiangen@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>,
	"Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@huawei.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	linmiaohe <linmiaohe@huawei.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] mm: memory-failure: use rcu lock instead of tasklist_lock when collect_procs()
Date: Tue, 5 Sep 2023 14:57:32 +0800	[thread overview]
Message-ID: <60f989f0-cfe2-61b5-5f5c-afe9584d8755@huawei.com> (raw)
In-Reply-To: <20230903164122.fb7148f8004402a7552c3ec6@linux-foundation.org>



在 2023/9/4 7:41, Andrew Morton 写道:
> On Mon, 28 Aug 2023 10:25:27 +0800 Tong Tiangen <tongtiangen@huawei.com> wrote:
> 
>> We found a softlock issue in our test, analyzed the logs, and found that
>> the relevant CPU call trace as follows:
>>
>> ...
>>
>> By removing the use of tasklist_lock in task list iteration, we can break
>> the softlock chain above.
>>
> 
> So I assume we'd like to backport this fix into -stable kernels?
> 
> If so, are we able to identify a suitble Fixes: target?
> .

After checking the git logs of these functions, the lock-related code
line is available when the functions are first introduced, as follows:

	copy_process(): kernel/fork.c
		commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (tag: v2.6.12-rc2)
		Author: Linus Torvalds <torvalds@ppc970.osdl.org>
		Date:   Sat Apr 16 15:20:36 2005 -0700
		
			Linux-2.6.12-rc2
		
	wp_page_copy(): mm/memory.c
		commit 2f38ab2c3c7fef04dca0313fd89d91f142ca9281
		Author: Shachar Raindel <raindel@mellanox.com>
		Date:   Tue Apr 14 15:46:32 2015 -0700
		
			mm: refactor do_wp_page, extract the page copy flow
		
	pte_offset_map_lock: include/linux/mm.hq	
		commit c74df32c724a1652ad8399b4891bb02c9d43743a
		Author: Hugh Dickins <hugh@veritas.com>
		Date:   Sat Oct 29 18:16:23 2005 -0700
		
			[PATCH] mm: ptd_alloc take ptlock
	
	collect_procs_anon(): mm/memory-failure.c
		commit 6a46079cf57a7f7758e8b926980a4f852f89b34d
		Author: Andi Kleen <andi@firstfloor.org>
		Date:   Wed Sep 16 11:50:15 2009 +0200
			HWPOISON: The high level memory error handler in the VM v7

Is it appropriate to use the commit of the last introduction 
function(wp_page_copy())?
	Fixes: 2f38ab2c3c7f ("refactor do_wp_page, extract the page copy flow")

Or use the commit introduced by the error reporting 
function(collect_procs_anon())?
	Fixes: 6a46079cf57a ("HWPOISON: The high level memory error handler in 
the VM v7")

      reply	other threads:[~2023-09-05 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28  2:25 Tong Tiangen
2023-09-03 23:41 ` Andrew Morton
2023-09-05  6:57   ` Tong Tiangen [this message]

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=60f989f0-cfe2-61b5-5f5c-afe9584d8755@huawei.com \
    --to=tongtiangen@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=paulmck@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®