All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Andrew Morton <akpm@linux-foundation.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Hugh Dickins <hughd@google.com>,
	Seth Jennings <sjenning@redhat.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Vitaly Wool <vitaly.wool@konsulko.com>,
	Matthew Wilcox <willy@infradead.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [PATCH 03/13] frontswap: remove frontswap_tmem_exclusive_gets
Date: Fri, 24 Dec 2021 07:22:36 +0100	[thread overview]
Message-ID: <20211224062246.1258487-4-hch@lst.de> (raw)
In-Reply-To: <20211224062246.1258487-1-hch@lst.de>

frontswap_tmem_exclusive_gets is never called, so remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/frontswap.h |  2 --
 mm/frontswap.c            | 23 +----------------------
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h
index 4a03fda415725..83a56392cc7f6 100644
--- a/include/linux/frontswap.h
+++ b/include/linux/frontswap.h
@@ -26,8 +26,6 @@ struct frontswap_ops {
 extern void frontswap_register_ops(struct frontswap_ops *ops);
 extern void frontswap_shrink(unsigned long);
 extern unsigned long frontswap_curr_pages(void);
-#define FRONTSWAP_HAS_EXCLUSIVE_GETS
-extern void frontswap_tmem_exclusive_gets(bool);
 
 extern bool __frontswap_test(struct swap_info_struct *, pgoff_t);
 extern void __frontswap_init(unsigned type, unsigned long *map);
diff --git a/mm/frontswap.c b/mm/frontswap.c
index 51a662a839559..dba7f087ee862 100644
--- a/mm/frontswap.c
+++ b/mm/frontswap.c
@@ -32,13 +32,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly;
 #define for_each_frontswap_ops(ops)		\
 	for ((ops) = frontswap_ops; (ops); (ops) = (ops)->next)
 
-/*
- * If enabled, the underlying tmem implementation is capable of doing
- * exclusive gets, so frontswap_load, on a successful tmem_get must
- * mark the page as no longer in frontswap AND mark it dirty.
- */
-static bool frontswap_tmem_exclusive_gets_enabled __read_mostly;
-
 #ifdef CONFIG_DEBUG_FS
 /*
  * Counters available via /sys/kernel/debug/frontswap (if debugfs is
@@ -160,15 +153,6 @@ void frontswap_register_ops(struct frontswap_ops *ops)
 }
 EXPORT_SYMBOL(frontswap_register_ops);
 
-/*
- * Enable/disable frontswap exclusive gets (see above).
- */
-void frontswap_tmem_exclusive_gets(bool enable)
-{
-	frontswap_tmem_exclusive_gets_enabled = enable;
-}
-EXPORT_SYMBOL(frontswap_tmem_exclusive_gets);
-
 /*
  * Called when a swap device is swapon'd.
  */
@@ -296,13 +280,8 @@ int __frontswap_load(struct page *page)
 		if (!ret) /* successful load */
 			break;
 	}
-	if (ret == 0) {
+	if (ret == 0)
 		inc_frontswap_loads();
-		if (frontswap_tmem_exclusive_gets_enabled) {
-			SetPageDirty(page);
-			__frontswap_clear(sis, offset);
-		}
-	}
 	return ret;
 }
 EXPORT_SYMBOL(__frontswap_load);
-- 
2.30.2


  parent reply	other threads:[~2021-12-24  6:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  6:22 remove Xen tmem leftovers Christoph Hellwig
2021-12-24  6:22 ` [PATCH 01/13] mm: remove cleancache Christoph Hellwig
2021-12-24  7:01   ` Juergen Gross
2021-12-24  7:02     ` Christoph Hellwig
2021-12-25 10:35   ` Geert Uytterhoeven
2021-12-24  6:22 ` [PATCH 02/13] frontswap: remove frontswap_writethrough Christoph Hellwig
2021-12-24  6:22 ` Christoph Hellwig [this message]
2021-12-24  6:22 ` [PATCH 04/13] frontswap: remove frontswap_shrink Christoph Hellwig
2021-12-24  6:22 ` [PATCH 05/13] frontswap: remove frontswap_curr_pages Christoph Hellwig
2021-12-24  6:22 ` [PATCH 06/13] frontswap: simplify frontswap_init Christoph Hellwig
2021-12-24  6:22 ` [PATCH 07/13] frontswap: remove the frontswap exports Christoph Hellwig
2021-12-24  6:22 ` [PATCH 08/13] mm: simplify try_to_unuse Christoph Hellwig
2021-12-24  6:22 ` [PATCH 09/13] frontswap: remove frontswap_test Christoph Hellwig
2021-12-24  6:22 ` [PATCH 10/13] frontswap: simplify frontswap_register_ops Christoph Hellwig
2021-12-24  6:22 ` [PATCH 11/13] mm: mark swap_lock and swap_active_head static Christoph Hellwig
2021-12-24  6:22 ` [PATCH 12/13] frontswap: remove support for multiple ops Christoph Hellwig
2021-12-24  6:22 ` [PATCH 13/13] mm: hide the FRONTSWAP Kconfig symbol Christoph Hellwig
2022-01-04 14:31 ` remove Xen tmem leftovers David Hildenbrand
2022-01-04 14:46   ` Christoph Hellwig
2022-01-05  6:08   ` Juergen Gross
2022-01-05  8:46     ` David Hildenbrand
2022-01-05 19:36       ` Konrad Rzeszutek Wilk

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=20211224062246.1258487-4-hch@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=hughd@google.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sjenning@redhat.com \
    --cc=vitaly.wool@konsulko.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 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.