[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130222082630.GA21294@Corona>
Date: Fri, 22 Feb 2013 17:26:31 +0900
From: Kyungsik Lee <kyungsik.lee@....com>
To: dsterba@...e.cz
Cc: Chris Mason <chris.mason@...ionio.com>,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
hyojun.im@....com, chan.jeong@....com, raphael.andy.lee@...il.com
Subject: Re: [PATCH v2] btrfs: use kmalloc for lzo de/compress buffer
On Thu, Feb 21, 2013 at 02:41:53PM +0100, David Sterba wrote:
> On Mon, Feb 18, 2013 at 04:56:04PM +0900, Kyungsik Lee wrote:
> > @@ -55,8 +55,9 @@ static struct list_head *lzo_alloc_workspace(void)
> > return ERR_PTR(-ENOMEM);
> >
> > workspace->mem = vmalloc(LZO1X_MEM_COMPRESS);
> > - workspace->buf = vmalloc(PAGE_CACHE_SIZE);
> > - workspace->cbuf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
> > + workspace->buf = kmalloc(PAGE_CACHE_SIZE, GFP_NOFS);
> > + workspace->cbuf = kmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE),
>
> This is still larger than usual page size and allocator may issue a
> warning, so if we want to use kmalloc (it's ~4.4k in size and likely to
> be available, but not always due to possible page fragmentation), the
> __GFP_NOWARN should be supplied and if the allocation fails fall back to
> vmalloc.
Right, there shoud be another fixed verson for this.
Thanks,
Kyungsik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists