linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: hughd@google.com, ying.huang@intel.com, linmiaohe@huawei.com,
	Andrew Morton <akpm@linux-foundation.org>
Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] Revert "mm: swap: check if swap backing device is congested or not"
Date: Tue, 10 Aug 2021 13:29:36 -0700	[thread overview]
Message-ID: <20210810202936.2672-3-shy828301@gmail.com> (raw)
In-Reply-To: <20210810202936.2672-1-shy828301@gmail.com>

Due to the change about how block layer detects congestion the
justification of commit 8fd2e0b505d1 ("mm: swap: check if swap backing device
is congested or not") doesn't stand anymore, so the commit could be just
reverted in order to solve the race reported by commit 2efa33fc7f6e ("mm/shmem:
fix shmem_swapin() race with swapoff"). The fix was reverted by the
previous patch.

Suggested-by: Hugh Dickins <hughd@google.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Yang Shi <shy828301@gmail.com>
---
 mm/swap_state.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/mm/swap_state.c b/mm/swap_state.c
index 1a29b4f98208..8d4104242100 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -628,13 +628,6 @@ struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask,
 	if (!mask)
 		goto skip;
 
-	/* Test swap type to make sure the dereference is safe */
-	if (likely(si->flags & (SWP_BLKDEV | SWP_FS_OPS))) {
-		struct inode *inode = si->swap_file->f_mapping->host;
-		if (inode_read_congested(inode))
-			goto skip;
-	}
-
 	do_poll = false;
 	/* Read a page_cluster sized and aligned cluster around offset. */
 	start_offset = offset & ~mask;
-- 
2.26.2



  parent reply	other threads:[~2021-08-10 20:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 20:29 [PATCH 1/3 linux-next] Revert "mm,shmem: fix a typo in shmem_swapin_page()" Yang Shi
2021-08-10 20:29 ` [PATCH 2/3] Revert "mm/shmem: fix shmem_swapin() race with swapoff" Yang Shi
2021-08-10 23:14   ` Yang Shi
2021-08-10 20:29 ` Yang Shi [this message]
2021-08-10 21:08   ` [PATCH 3/3] Revert "mm: swap: check if swap backing device is congested or not" Hugh Dickins
2021-08-10 21:30     ` Yang Shi
2021-08-10 21:57       ` Hugh Dickins

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=20210810202936.2672-3-shy828301@gmail.com \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ying.huang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox