[merged] mm-workingset-remove-local_irq_disable-from-count_shadow_nodes.patch removed from -mm tree

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

 



The patch titled
     Subject: mm: workingset: remove local_irq_disable() from count_shadow_nodes()
has been removed from the -mm tree.  Its filename was
     mm-workingset-remove-local_irq_disable-from-count_shadow_nodes.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Subject: mm: workingset: remove local_irq_disable() from count_shadow_nodes()

Patch series "mm: use irq locking suffix instead local_irq_disable()".

A small series which avoids using local_irq_disable()/local_irq_enable()
but instead does spin_lock_irq()/spin_unlock_irq() so it is within the
context of the lock which it belongs to.  Patch #1 is a cleanup where
local_irq_.*() remained after the lock was removed.


This patch (of 2):

In 0c7c1bed7e13 ("mm: make counting of list_lru_one::nr_items lockless")
the

	spin_lock(&nlru->lock);

statement was replaced with
	rcu_read_lock();

in __list_lru_count_one().  The comment in count_shadow_nodes() says that
the local_irq_disable() is required because the lock must be acquired with
disabled interrupts and (spin_lock()) does not do so.  Since the lock is
replaced with rcu_read_lock() the local_irq_disable() is no longer needed.
The code path is

  list_lru_shrink_count()
    -> list_lru_count_one()
      -> __list_lru_count_one()
        -> rcu_read_lock()
        -> list_lru_from_memcg_idx()
        -> rcu_read_unlock()

Remove the local_irq_disable() statement.

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

 mm/workingset.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/mm/workingset.c~mm-workingset-remove-local_irq_disable-from-count_shadow_nodes
+++ a/mm/workingset.c
@@ -366,10 +366,7 @@ static unsigned long count_shadow_nodes(
 	unsigned long nodes;
 	unsigned long cache;
 
-	/* list_lru lock nests inside the IRQ-safe i_pages lock */
-	local_irq_disable();
 	nodes = list_lru_shrink_count(&shadow_nodes, sc);
-	local_irq_enable();
 
 	/*
 	 * Approximate a reasonable limit for the radix tree nodes
_

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

bdi-use-refcount_t-for-reference-counting-instead-atomic_t.patch
userns-use-refcount_t-for-reference-counting-instead-atomic_t.patch




[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