+ bdi-use-irqsave-variant-of-refcount_dec_and_lock.patch added to -mm tree

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

 



The patch titled
     Subject: bdi: use irqsave variant of refcount_dec_and_lock()
has been added to the -mm tree.  Its filename is
     bdi-use-irqsave-variant-of-refcount_dec_and_lock.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/bdi-use-irqsave-variant-of-refcount_dec_and_lock.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/bdi-use-irqsave-variant-of-refcount_dec_and_lock.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: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>
Subject: bdi: use irqsave variant of refcount_dec_and_lock()

The irqsave variant of refcount_dec_and_lock handles irqsave/restore when
taking/releasing the spin lock.  With this variant the call of
local_irq_save/restore is no longer required.

[bigeasy@xxxxxxxxxxxxx: s@atomic_dec_and_lock@refcount_dec_and_lock@g]
Link: http://lkml.kernel.org/r/20180703200141.28415-5-bigeasy@xxxxxxxxxxxxx
Signed-off-by: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN mm/backing-dev.c~bdi-use-irqsave-variant-of-refcount_dec_and_lock mm/backing-dev.c
--- a/mm/backing-dev.c~bdi-use-irqsave-variant-of-refcount_dec_and_lock
+++ a/mm/backing-dev.c
@@ -508,11 +508,8 @@ void wb_congested_put(struct bdi_writeba
 {
 	unsigned long flags;
 
-	local_irq_save(flags);
-	if (!refcount_dec_and_lock(&congested->refcnt, &cgwb_lock)) {
-		local_irq_restore(flags);
+	if (!refcount_dec_and_lock_irqsave(&congested->refcnt, &cgwb_lock, &flags))
 		return;
-	}
 
 	/* bdi might already have been destroyed leaving @congested unlinked */
 	if (congested->__bdi) {
_

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

bdi-use-irqsave-variant-of-refcount_dec_and_lock.patch
userns-use-irqsave-variant-of-refcount_dec_and_lock.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