summaryrefslogtreecommitdiffstats
path: root/mm/workingset.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-08-18 09:05:56 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2020-10-13 08:41:26 -0400
commitf82cd2f0b5eb715b1a296e20b34da7d296b6e9a4 (patch)
treed932395ef576740b64fc24e9be268fe00ecbc56a /mm/workingset.c
parent8446466c9dd645da4c1848f35ffd0fc1df3524ee (diff)
downloadlinux-f82cd2f0b5eb715b1a296e20b34da7d296b6e9a4.tar.gz
linux-f82cd2f0b5eb715b1a296e20b34da7d296b6e9a4.tar.bz2
linux-f82cd2f0b5eb715b1a296e20b34da7d296b6e9a4.zip
XArray: Add private interface for workingset node deletion
Move the tricky bits of dealing with the XArray from the workingset code to the XArray. Make it clear in the documentation that this is a private interface, and only export it for the benefit of the test suite. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/workingset.c')
-rw-r--r--mm/workingset.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/mm/workingset.c b/mm/workingset.c
index 92e66113a577..e185bfb8bd4e 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -519,12 +519,11 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
void *arg) __must_hold(lru_lock)
{
struct xa_node *node = container_of(item, struct xa_node, private_list);
- XA_STATE(xas, node->array, 0);
struct address_space *mapping;
int ret;
/*
- * Page cache insertions and deletions synchroneously maintain
+ * Page cache insertions and deletions synchronously maintain
* the shadow node LRU under the i_pages lock and the
* lru_lock. Because the page cache tree is emptied before
* the inode can be destroyed, holding the lru_lock pins any
@@ -559,15 +558,7 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
if (WARN_ON_ONCE(node->count != node->nr_values))
goto out_invalid;
mapping->nrexceptional -= node->nr_values;
- xas.xa_node = xa_parent_locked(&mapping->i_pages, node);
- xas.xa_offset = node->offset;
- xas.xa_shift = node->shift + XA_CHUNK_SHIFT;
- xas_set_update(&xas, workingset_update_node);
- /*
- * We could store a shadow entry here which was the minimum of the
- * shadow entries we were tracking ...
- */
- xas_store(&xas, NULL);
+ xa_delete_node(node, workingset_update_node);
__inc_lruvec_slab_state(node, WORKINGSET_NODERECLAIM);
out_invalid: