+ mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/list_lru.c: pass struct list_lru_node* as an argument to __list_lru_walk_one()
has been added to the -mm tree.  Its filename is
     mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Subject: mm/list_lru.c: pass struct list_lru_node* as an argument to __list_lru_walk_one()

__list_lru_walk_one() is invoked with struct list_lru *lru, int nid as the
first two argument.  Those two are only used to retrieve struct
list_lru_node.  Since this is already done by the caller of the function
for the locking, we can pass struct list_lru_node* directly and avoid the
dance around it.

Link: http://lkml.kernel.org/r/20180716111921.5365-4-bigeasy@xxxxxxxxxxxxx
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Reviewed-by: Vladimir Davydov <vdavydov.dev@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/list_lru.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -puN mm/list_lru.c~mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one mm/list_lru.c
--- a/mm/list_lru.c~mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one
+++ a/mm/list_lru.c
@@ -209,12 +209,11 @@ unsigned long list_lru_count_node(struct
 EXPORT_SYMBOL_GPL(list_lru_count_node);
 
 static unsigned long
-__list_lru_walk_one(struct list_lru *lru, int nid, int memcg_idx,
+__list_lru_walk_one(struct list_lru_node *nlru, int memcg_idx,
 		    list_lru_walk_cb isolate, void *cb_arg,
 		    unsigned long *nr_to_walk)
 {
 
-	struct list_lru_node *nlru = &lru->node[nid];
 	struct list_lru_one *l;
 	struct list_head *item, *n;
 	unsigned long isolated = 0;
@@ -276,8 +275,8 @@ list_lru_walk_one(struct list_lru *lru,
 	unsigned long ret;
 
 	spin_lock(&nlru->lock);
-	ret = __list_lru_walk_one(lru, nid, memcg_cache_id(memcg),
-				  isolate, cb_arg, nr_to_walk);
+	ret = __list_lru_walk_one(nlru, memcg_cache_id(memcg), isolate, cb_arg,
+				  nr_to_walk);
 	spin_unlock(&nlru->lock);
 	return ret;
 }
@@ -297,8 +296,9 @@ unsigned long list_lru_walk_node(struct
 			struct list_lru_node *nlru = &lru->node[nid];
 
 			spin_lock(&nlru->lock);
-			isolated += __list_lru_walk_one(lru, nid, memcg_idx,
-						isolate, cb_arg, nr_to_walk);
+			isolated += __list_lru_walk_one(nlru, memcg_idx,
+							isolate, cb_arg,
+							nr_to_walk);
 			spin_unlock(&nlru->lock);
 
 			if (*nr_to_walk <= 0)
_

Patches currently in -mm which might be from bigeasy@xxxxxxxxxxxxx are

ntfs-dont-disable-interrupts-during-kmap_atomic.patch
mm-workingset-remove-local_irq_disable-from-count_shadow_nodes.patch
mm-workingset-make-shadow_lru_isolate-use-locking-suffix.patch
mm-list_lru-use-list_lru_walk_one-in-list_lru_walk_node.patch
mm-list_lru-move-locking-from-__list_lru_walk_one-to-its-caller.patch
mm-list_lru-pass-struct-list_lru_node-as-an-argument-__list_lru_walk_one.patch
mm-list_lru-introduce-list_lru_shrink_walk_irq.patch
bdi-use-refcount_t-for-reference-counting-instead-atomic_t.patch
userns-use-refcount_t-for-reference-counting-instead-atomic_t.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux