* [PATCH v5 1/4] zram: Fix deadlock bug in partial write
@ 2013-01-22 23:52 Minchan Kim
2013-01-22 23:58 ` Nitin Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Minchan Kim @ 2013-01-22 23:52 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-mm, linux-kernel, Nitin Gupta, Seth Jennings,
Konrad Rzeszutek Wilk, Dan Magenheimer, Pekka Enberg, jmarchan,
Minchan Kim, stable
Now zram allocates new page with GFP_KERNEL in zram I/O path
if IO is partial. Unfortunately, It may cuase deadlock with
reclaim path so this patch solves the problem.
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: stable@vger.kernel.org
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
drivers/staging/zram/zram_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 61fb8f1..b285b3a 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -220,7 +220,7 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
user_mem = kmap_atomic(page);
if (is_partial_io(bvec))
/* Use a temporary buffer to decompress the page */
- uncmem = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ uncmem = kmalloc(PAGE_SIZE, GFP_ATOMIC);
else
uncmem = user_mem;
@@ -268,7 +268,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
* This is a partial IO. We need to read the full page
* before to write the changes.
*/
- uncmem = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ uncmem = kmalloc(PAGE_SIZE, GFP_NOIO);
if (!uncmem) {
pr_info("Error allocating temp memory!\n");
ret = -ENOMEM;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v5 1/4] zram: Fix deadlock bug in partial write
2013-01-22 23:52 [PATCH v5 1/4] zram: Fix deadlock bug in partial write Minchan Kim
@ 2013-01-22 23:58 ` Nitin Gupta
2013-01-23 0:06 ` Minchan Kim
0 siblings, 1 reply; 3+ messages in thread
From: Nitin Gupta @ 2013-01-22 23:58 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg Kroah-Hartman, linux-mm, linux-kernel, Seth Jennings,
Konrad Rzeszutek Wilk, Dan Magenheimer, Pekka Enberg, jmarchan,
stable
On Tue, Jan 22, 2013 at 3:52 PM, Minchan Kim <minchan@kernel.org> wrote:
> Now zram allocates new page with GFP_KERNEL in zram I/O path
> if IO is partial. Unfortunately, It may cuase deadlock with
> reclaim path so this patch solves the problem.
>
> Cc: Jerome Marchand <jmarchan@redhat.com>
> Cc: stable@vger.kernel.org
> Acked-by: Nitin Gupta <ngupta@vflare.org>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> drivers/staging/zram/zram_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Changelog for v4 vs v5?
Thanks,
Nitin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v5 1/4] zram: Fix deadlock bug in partial write
2013-01-22 23:58 ` Nitin Gupta
@ 2013-01-23 0:06 ` Minchan Kim
0 siblings, 0 replies; 3+ messages in thread
From: Minchan Kim @ 2013-01-23 0:06 UTC (permalink / raw)
To: Nitin Gupta
Cc: Greg Kroah-Hartman, linux-mm, linux-kernel, Seth Jennings,
Konrad Rzeszutek Wilk, Dan Magenheimer, Pekka Enberg, jmarchan,
stable
Hi Nitin,
On Tue, Jan 22, 2013 at 03:58:10PM -0800, Nitin Gupta wrote:
> On Tue, Jan 22, 2013 at 3:52 PM, Minchan Kim <minchan@kernel.org> wrote:
> > Now zram allocates new page with GFP_KERNEL in zram I/O path
> > if IO is partial. Unfortunately, It may cuase deadlock with
> > reclaim path so this patch solves the problem.
> >
> > Cc: Jerome Marchand <jmarchan@redhat.com>
> > Cc: stable@vger.kernel.org
> > Acked-by: Nitin Gupta <ngupta@vflare.org>
> > Signed-off-by: Minchan Kim <minchan@kernel.org>
> > ---
> > drivers/staging/zram/zram_drv.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
>
> Changelog for v4 vs v5?
It's just adding your Acked-by in whole series.
I thought it's minor.
Thanks for the review, Nitin.
>
> Thanks,
> Nitin
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Kind regards,
Minchan Kim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-23 0:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 23:52 [PATCH v5 1/4] zram: Fix deadlock bug in partial write Minchan Kim
2013-01-22 23:58 ` Nitin Gupta
2013-01-23 0:06 ` Minchan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox