diff mbox

[3.5.y.z,extended,stable] Patch "Revert "zram: use zram->lock to protect zram_free_page() in" has been added to staging queue

Message ID 1379705786-17445-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques Sept. 20, 2013, 7:36 p.m. UTC
This is a note to let you know that I have just added a patch titled

    Revert "zram: use zram->lock to protect zram_free_page() in

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From 467b2efb6157375af156f0a99acc2c261b1c8bc2 Mon Sep 17 00:00:00 2001
From: Luis Henriques <luis.henriques@canonical.com>
Date: Fri, 20 Sep 2013 15:45:07 +0100
Subject: [PATCH] Revert "zram: use zram->lock to protect zram_free_page() in
 swap free notify path"

This reverts commit 9e443904906ca2b5b3ae71f34ac4a4fa6905623e, which
was commit 57ab048532c0d975538cebd4456491b5c34248f4 upstream.

This commit was identified as provoking system lockups when under high
memory pressure, as noted in the following bug report:

BugLink: https://bugs.launchpad.net/bugs/1215513

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/staging/zram/zram_drv.c | 2 --
 drivers/staging/zram/zram_drv.h | 5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)

--
1.8.3.2
diff mbox

Patch

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 2e88a68..60ffc8c 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -697,9 +697,7 @@  static void zram_slot_free_notify(struct block_device *bdev,
 	struct zram *zram;

 	zram = bdev->bd_disk->private_data;
-	down_write(&zram->lock);
 	zram_free_page(zram, index);
-	up_write(&zram->lock);
 	zram_stat64_inc(zram, &zram->stats.notify_free);
 }

diff --git a/drivers/staging/zram/zram_drv.h b/drivers/staging/zram/zram_drv.h
index 1047e82..fbe8ac9 100644
--- a/drivers/staging/zram/zram_drv.h
+++ b/drivers/staging/zram/zram_drv.h
@@ -107,9 +107,8 @@  struct zram {
 	void *compress_buffer;
 	struct table *table;
 	spinlock_t stat64_lock;	/* protect 64-bit stats */
-	struct rw_semaphore lock; /* protect compression buffers, table,
-				   * 32bit stat counters against concurrent
-				   * notifications, reads and writes */
+	struct rw_semaphore lock; /* protect compression buffers and table
+				   * against concurrent read and writes */
 	struct request_queue *queue;
 	struct gendisk *disk;
 	int init_done;