Re: [PATCH 1/2] zram: factor-out zram_decompress_page() function

2012-10-30 Thread Nitin Gupta
On 10/30/2012 02:04 PM, Sergey Senozhatsky wrote: On (10/29/12 10:14), Nitin Gupta wrote: == zram: Fix use-after-free in partial I/O case When the compressed size of a page exceeds a threshold, the page is stored as-is i.e. in uncompressed form. In the partial I/O i.e. non-PAGE_SIZE'ed I/O

Re: [PATCH 1/3] zsmalloc: promote to lib/

2012-09-26 Thread Nitin Gupta
2012/9/26 Pekka Enberg penb...@kernel.org: On Wed, Sep 26, 2012 at 11:50 AM, Minchan Kim minc...@kernel.org wrote: lib/Kconfig |2 + lib/Makefile |1 + lib/zsmalloc/Kconfig | 18 + lib/zsmalloc/Makefile

Re: [PATCH] [staging][zram] Fix handling of incompressible pages

2012-10-22 Thread Nitin Gupta
On Mon, Oct 22, 2012 at 1:43 PM, Greg KH g...@kroah.com wrote: On Wed, Oct 10, 2012 at 05:42:18PM -0700, Nitin Gupta wrote: Change 130f315a (staging: zram: remove special handle of uncompressed page) introduced a bug in the handling of incompressible pages which resulted in memory allocation

[PATCH] [staging][zram] Fix handling of incompressible pages

2012-10-08 Thread Nitin Gupta
from zsmalloc. Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: viech...@gmail.com Reported-by: paer...@gmail.com Reported-by: wu.to...@gmail.com Tested-by: wu.to...@gmail.com Tested-by: mich...@zugelder.org --- drivers/staging/zram/zram_drv.c | 12 ++-- 1 file changed, 10

Re: [PATCH] [staging][zram] Fix handling of incompressible pages

2012-10-09 Thread Nitin Gupta
Hi Minchan, On 10/09/2012 06:31 AM, Minchan Kim wrote: On Mon, Oct 08, 2012 at 06:32:44PM -0700, Nitin Gupta wrote: Change 130f315a introduced a bug in the handling of incompressible pages which resulted in memory allocation failure for such pages. The fix is to store the page as-is i.e

[PATCH] [staging][zram] Fix handling of incompressible pages

2012-10-10 Thread Nitin Gupta
then be requested from zsmalloc which supports PAGE_SIZE sized allocations. Lastly, the fix checks that we do not attempt to decompress the page which we stored in the uncompressed form -- we just memcpy() out such pages. Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: viech...@gmail.com

Re: [PATCH 1/2] zram: factor-out zram_decompress_page() function

2012-10-29 Thread Nitin Gupta
as-is i.e. in uncompressed form. In the partial I/O i.e. non-PAGE_SIZE'ed I/O case, however, the uncompressed memory was being freed before it could be copied into the zsmalloc pool resulting in use-after-free bug. Signed-off-by: Nitin Gupta ngu...@vflare.org --- diff --git a/drivers/staging

Re: [PATCH 2/2] zram: handle mem suffixes in disk size zram_sysfs parameter

2012-10-29 Thread Nitin Gupta
On 10/27/2012 09:03 AM, Sergey Senozhatsky wrote: zram: handle mem suffixes in disk size zram_sysfs parameter Use memparse() to allow mem suffixes in disksize sysfs number. Examples: echo 256K /sys/block/zram0/disksize echo 512M /sys/block/zram0/disksize echo

Re: [PATCH 1/2] zram: factor-out zram_decompress_page() function (v2)

2012-10-29 Thread Nitin Gupta
On Mon, Oct 29, 2012 at 11:05 AM, Sergey Senozhatsky sergey.senozhat...@gmail.com wrote: zram: factor-out zram_decompress_page() function zram_bvec_read() shared decompress functionality with zram_read_before_write() function. Factor-out and make commonly used zram_decompress_page()

Re: [PATCH 2/2] zram: handle mem suffixes in disk size zram_sysfs parameter (v2)

2012-10-29 Thread Nitin Gupta
/sys/block/zram0/disksize echo 1G /sys/block/zram0/disksize Signed-off-by: Sergey Senozhatsky sergey.senozhat...@gmail.com FWIW, Reviewed-by: Nitin Gupta ngu...@vflare.org Thanks, Nitin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Patch for CIFS vfs

2005-01-31 Thread Nitin Gupta
. Please give test results and comments to -- [EMAIL PROTECTED] Nitin Gupta Thanks _ Manage information better. Optimise your tasks. http://www.microsoft.com/india/office/experience/ Experience MS Office System. --- linux/fs/cifs/file.c

[PATCH v3] zram: fix invalid memory references during disk write

2012-11-29 Thread Nitin Gupta
buffer. Fixes bug 50081: https://bugzilla.kernel.org/show_bug.cgi?id=50081 Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: Mihail Kasadjikov hamer...@gmail.com Reported-by: Tomas M to...@slax.org Reviewed-by: Minchan Kim minc...@kernel.org --- drivers/staging/zram/zram_drv.c | 39

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim minc...@kernel.org wrote: On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: On 11/28/2012 11:45 PM, Minchan Kim wrote: On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: Adds zs_get_object_size(handle) which provides the size

Re: [PATCH v3] zram: fix invalid memory references during disk write

2012-11-29 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 6:13 PM, Greg KH g...@kroah.com wrote: On Fri, Nov 30, 2012 at 09:36:09AM +0900, Minchan Kim wrote: Hi Greg, I would like to tidy zram_bvec_write up but it needs more churn than needed to fix this bug and makes review hard. So I want you to pick up this patch asap

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 5:58 PM, Minchan Kim minc...@kernel.org wrote: On Thu, Nov 29, 2012 at 04:53:15PM -0800, Nitin Gupta wrote: On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim minc...@kernel.org wrote: On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: On 11/28/2012 11:45 PM

zram: fix invalid memory references during disk write

2012-11-29 Thread Nitin Gupta
: sta...@vger.kernel.org # staging-next: 37b51fd: zram: factor-out # zram_decompress_page() function Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: Mihail Kasadjikov hamer...@gmail.com Reported-by: Tomas M to...@slax.org Reviewed-by: Minchan Kim minc

[PATCH v2 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
and the start gives us the object size. Signed-off-by: Nitin Gupta ngu...@vflare.org --- drivers/staging/zsmalloc/zsmalloc-main.c | 177 +- drivers/staging/zsmalloc/zsmalloc.h |1 + 2 files changed, 127 insertions(+), 51 deletions(-) diff --git a/drivers/staging

[PATCH v2 2/2] zram: reduce metadata overhead

2012-11-29 Thread Nitin Gupta
field was needed only to mark a given page as zero-filled. Instead of this field, we now use an invalid value (-1) to mark such pages. Lastly, the count field was unused, so was simply removed. Signed-off-by: Nitin Gupta ngu...@vflare.org Reviewed-by: Jerome Marchand jmarc...@redhat.com

Re: zram: fix invalid memory references during disk write

2012-11-29 Thread Nitin Gupta
(somehow mail didn't go to the stable email alias and [PATCH] prefix was not added. CC'ed stable now) On 11/29/2012 10:45 PM, Nitin Gupta wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write

Re: [PATCH v2 1/2] zsmalloc: add function to query object size

2012-12-02 Thread Nitin Gupta
On Nov 30, 2012, at 5:54 AM, Minchan Kim minchan.kerne...@gmail.com wrote: On Thu, Nov 29, 2012 at 10:54:48PM -0800, Nitin Gupta wrote: Changelog v2 vs v1: - None Adds zs_get_object_size(handle) which provides the size of the given object. This is useful since the user (zram etc.) now

Re: [PATCH 2/2] zram: gather statistics in a unique file

2013-02-11 Thread Nitin Gupta
On 02/11/2013 10:16 AM, Greg Kroah-Hartman wrote: On Mon, Feb 11, 2013 at 10:07:45AM -0800, Davidlohr Bueso wrote: On Sun, 2013-02-10 at 21:41 -0800, Greg Kroah-Hartman wrote: On Sun, Feb 10, 2013 at 08:29:06PM -0800, Davidlohr Bueso wrote: Instead of having one sysfs file per zram statistic,

Re: [PATCHv2 1/9] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-24 Thread Nitin Gupta
-by: Nitin Gupta ngu...@vflare.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCHv2 2/9] staging: zsmalloc: remove unsed pool name

2013-01-24 Thread Nitin Gupta
zs_pool *pool, size_t size, gfp_t flags); -- 1.7.9.5 Acked-by: Nitin Gupta ngu...@vflare.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please

Re: [PATCHv2 3/9] staging: zsmalloc: add page alloc/free callbacks

2013-01-24 Thread Nitin Gupta
/zsmalloc-main.c | 43 ++ drivers/staging/zsmalloc/zsmalloc.h |8 +- 4 files changed, 41 insertions(+), 14 deletions(-) Some documentation about zs_ops in zs_create_pool() would be useful. Otherwise, looks good to me. Acked-by: Nitin Gupta ngu

Re: [PATCHv2 4/9] staging: zsmalloc: make CLASS_DELTA relative to PAGE_SIZE

2013-01-24 Thread Nitin Gupta
be more involved, so perhaps, should be done in another patch. Can you please resend part of this series (patch 1 to patch 4) which deals just with zsmalloc separately? I haven't yet looked into zswap itself so would help with zsmalloc bits are separated out. Acked-by: Nitin Gupta ngu

Re: [PATCH 3/3] zram: get rid of lockdep warning

2013-01-21 Thread Nitin Gupta
On 01/20/2013 09:18 PM, Minchan Kim wrote: On Fri, Jan 18, 2013 at 01:34:18PM -0800, Nitin Gupta wrote: On Wed, Jan 16, 2013 at 6:12 PM, Minchan Kim minc...@kernel.org wrote: Lockdep complains about recursive deadlock of zram-init_lock. [1] made it false positive because we can't request IO

Re: [PATCH v4 1/4] zram: Fix deadlock bug in partial write

2013-01-22 Thread Nitin Gupta
On 01/21/2013 04:07 PM, Minchan Kim 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: Nitin Gupta ngu...@vflare.org Cc: Jerome Marchand jmarc...@redhat.com Cc: sta

Re: [PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-22 Thread Nitin Gupta
...@vger.kernel.org Acked-by: Nitin Gupta ngu...@vflare.org Signed-off-by: Minchan Kim minc...@kernel.org --- drivers/staging/zram/zram_drv.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Changelog for v4 vs v5? Thanks, Nitin -- To unsubscribe from this list: send the line

Re: [PATCH 3/3] zram: get rid of lockdep warning

2013-01-18 Thread Nitin Gupta
On Wed, Jan 16, 2013 at 6:12 PM, Minchan Kim minc...@kernel.org wrote: Lockdep complains about recursive deadlock of zram-init_lock. [1] made it false positive because we can't request IO to zram before setting disksize. Anyway, we should shut lockdep up to avoid many reporting from user.

Re: [PATCHv5 1/8] zsmalloc: add to mm/

2013-02-19 Thread Nitin Gupta
-by: Nitin Gupta ngu...@vflare.org Acked-by: Minchan Kim minc...@kernel.org Signed-off-by: Seth Jennings sjenn...@linux.vnet.ibm.com --- include/linux/zsmalloc.h | 49 ++ mm/Kconfig | 24 + mm/Makefile |1 + mm/zsmalloc.c| 1124

Re: [RFC] mm: add support for zsmalloc and zcache

2012-09-08 Thread Nitin Gupta
On 09/07/2012 07:37 AM, Konrad Rzeszutek Wilk wrote: significant design challenges exist, many of which are already resolved in the new codebase (zcache2). These design issues include: .. snip.. Before other key mm maintainers read and comment on zcache, I think it would be most wise to move

Re: [RFC] mm: add support for zsmalloc and zcache

2012-09-17 Thread Nitin Gupta
On Mon, Sep 17, 2012 at 1:42 PM, Dan Magenheimer dan.magenhei...@oracle.com wrote: From: Nitin Gupta [mailto:ngu...@vflare.org] Subject: Re: [RFC] mm: add support for zsmalloc and zcache The problem is that zbud performs well only when a (compressed) page is either PAGE_SIZE/2 - e

Re: [PATCH 0/7] zram/zsmalloc promotion

2012-08-13 Thread Nitin Gupta
On 08/13/2012 07:35 PM, Greg Kroah-Hartman wrote: On Wed, Aug 08, 2012 at 03:12:13PM +0900, Minchan Kim wrote: This patchset promotes zram/zsmalloc from staging. Both are very clean and zram is used by many embedded product for a long time. [1-3] are patches not merged into linux-next yet

Re: [PATCH 0/7] zram/zsmalloc promotion

2012-08-08 Thread Nitin Gupta
Kim (2): 6. zram: promote zram from staging 7. zram: select ZSMALLOC when ZRAM is configured All the changes look good to me. FWIW, for the entire series: Acked-by: Nitin Gupta ngu...@vflare.org Thanks for all the work. Nitin -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 0/7] zram/zsmalloc promotion

2012-08-16 Thread Nitin Gupta
On 08/13/2012 11:22 PM, Minchan Kim wrote: Hi Greg, On Mon, Aug 13, 2012 at 07:35:30PM -0700, Greg Kroah-Hartman wrote: On Wed, Aug 08, 2012 at 03:12:13PM +0900, Minchan Kim wrote: This patchset promotes zram/zsmalloc from staging. Both are very clean and zram is used by many embedded

Re: [PATCH 1/4] zsmalloc: remove x86 dependency

2012-07-11 Thread Nitin Gupta
On 07/02/2012 02:15 PM, Seth Jennings wrote: This patch replaces the page table assisted object mapping method, which has x86 dependencies, with a arch-independent method that does a simple copy into a temporary per-cpu buffer. While a copy seems like it would be worse than mapping the

Re: [PATCH 1/4] zsmalloc: remove x86 dependency

2012-07-11 Thread Nitin Gupta
On Wed, Jul 11, 2012 at 1:32 PM, Seth Jennings sjenn...@linux.vnet.ibm.com wrote: On 07/11/2012 01:26 PM, Nitin Gupta wrote: On 07/02/2012 02:15 PM, Seth Jennings wrote: This patch replaces the page table assisted object mapping method, which has x86 dependencies, with a arch-independent

Re: [PATCH 3/3] zsmalloc: add page table mapping method

2012-07-22 Thread Nitin Gupta
On 07/22/2012 08:26 PM, Minchan Kim wrote: On Wed, Jul 18, 2012 at 11:55:56AM -0500, Seth Jennings wrote: This patchset provides page mapping via the page table. On some archs, most notably ARM, this method has been demonstrated to be faster than copying. The logic controlling the method

Re: zram: fix invalid memory references during disk write

2012-12-07 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 10:45 PM, Nitin Gupta ngu...@vflare.org wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write. Invalid references could occur in two cases: - Incoming data expands

Re: [PATCH v2 1/2] zsmalloc: add function to query object size

2012-12-07 Thread Nitin Gupta
On Sun, Dec 2, 2012 at 11:52 PM, Minchan Kim minc...@kernel.org wrote: On Sun, Dec 02, 2012 at 11:20:42PM -0800, Nitin Gupta wrote: On Nov 30, 2012, at 5:54 AM, Minchan Kim minchan.kerne...@gmail.com wrote: On Thu, Nov 29, 2012 at 10:54:48PM -0800, Nitin Gupta wrote: Changelog v2 vs v1

feel Re: [PATCH v2 1/2] zsmalloc: add function to query object size

2012-12-10 Thread Nitin Gupta
On 12/10/2012 07:59 PM, Minchan Kim wrote: On Fri, Dec 07, 2012 at 04:45:53PM -0800, Nitin Gupta wrote: On Sun, Dec 2, 2012 at 11:52 PM, Minchan Kim minc...@kernel.org wrote: On Sun, Dec 02, 2012 at 11:20:42PM -0800, Nitin Gupta wrote: On Nov 30, 2012, at 5:54 AM, Minchan Kim minchan.kerne

Re: Lockdep complain for zram

2012-11-21 Thread Nitin Gupta
On 11/21/2012 12:37 AM, Minchan Kim wrote: Hi alls, Today, I saw below complain of lockdep. As a matter of fact, I knew it long time ago but forgot that. The reason lockdep complains is that now zram uses GFP_KERNEL in reclaim path(ex, __zram_make_request) :( I can fix it via replacing

Re: Lockdep complain for zram

2012-11-22 Thread Nitin Gupta
On 11/22/2012 12:31 AM, Minchan Kim wrote: Hi Nitin, On Wed, Nov 21, 2012 at 10:06:33AM -0800, Nitin Gupta wrote: On 11/21/2012 12:37 AM, Minchan Kim wrote: Hi alls, Today, I saw below complain of lockdep. As a matter of fact, I knew it long time ago but forgot that. The reason lockdep

[PATCH] staging: zram: Prevent use of unmapped buffer

2012-11-22 Thread Nitin Gupta
The commit c8f2f0db1 (zram: Fix handling of incompressible pages) introduced a bug which caused a kunmap()'ed buffer to be used in case of partial writes where the data was found to be incompressible. This fixes bug 50081: https://bugzilla.kernel.org/show_bug.cgi?id=50081 Signed-off-by: Nitin

Re: [PATCH 1/2] zram: force disksize setting before using zram

2012-11-26 Thread Nitin Gupta
On 11/22/2012 06:42 PM, Minchan Kim wrote: Now zram document syas set disksize is optional but partly it's wrong. When you try to use zram firstly after booting, you must set disksize, otherwise zram can't work because zram gendisk's size is 0. But once you do it, you can use zram freely after

Re: [PATCH 2/2] zram: allocate metadata when disksize is set up

2012-11-26 Thread Nitin Gupta
On 11/22/2012 06:42 PM, Minchan Kim wrote: Lockdep complains about recursive deadlock of zram-init_lock. Because zram_init_device could be called in reclaim context and it requires a page with GFP_KERNEL. We can fix it via replacing GFP_KERNEL with GFP_NOIO. But more big problem is vzalloc in

[PATCH] zram: Prevent use of unmapped buffer

2012-11-26 Thread Nitin Gupta
The commit c8f2f0db1 (zram: Fix handling of incompressible pages) introduced a bug which caused a kunmap()'ed buffer to be used in case of partial writes where the data was found to be incompressible. This fixes bug 50081: https://bugzilla.kernel.org/show_bug.cgi?id=50081 Signed-off-by: Nitin

[PATCH 1/2] zsmalloc: add function to query object size

2012-11-26 Thread Nitin Gupta
size. Signed-off-by: Nitin Gupta ngu...@vflare.org --- drivers/staging/zsmalloc/zsmalloc-main.c | 177 +- drivers/staging/zsmalloc/zsmalloc.h |1 + 2 files changed, 127 insertions(+), 51 deletions(-) diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b

[PATCH 2/2] zram: reduce metadata overhead

2012-11-26 Thread Nitin Gupta
an invalid value (-1) to mark such pages. Lastly, the count field was unused, so was simply removed. Signed-off-by: Nitin Gupta ngu...@vflare.org --- drivers/staging/zram/zram_drv.c | 80 ++- drivers/staging/zram/zram_drv.h | 18 + 2 files changed, 31

Re: [PATCH 2/2] zram: reduce metadata overhead

2012-11-28 Thread Nitin Gupta
On 11/27/2012 08:22 AM, Jerome Marchand wrote: On 11/27/2012 08:26 AM, Nitin Gupta wrote: For every allocated object, zram maintains the the handle, size, flags and count fields. Of these, only the handle is required since zsmalloc now provides the object size given the handle. The flags field

Re: [PATCH] zram: Prevent use of unmapped buffer

2012-11-28 Thread Nitin Gupta
On 11/28/2012 05:33 PM, Minchan Kim wrote: On Wed, Nov 28, 2012 at 02:15:05PM +0900, Minchan Kim wrote: Hi Nitin, On Mon, Nov 26, 2012 at 11:26:07PM -0800, Nitin Gupta wrote: The commit c8f2f0db1 (zram: Fix handling of incompressible pages) introduced a bug which caused a kunmap()'ed buffer

[PATCH v2] zram: Fix use-after-free bug in disk write case

2012-11-28 Thread Nitin Gupta
to be incompressible. Fixes bug 50081: https://bugzilla.kernel.org/show_bug.cgi?id=50081 Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: Mihail Kasadjikov hamer...@gmail.com Reported-by: Tomas M to...@slax.org Reviewed-by: Minchan Kim minc...@kernel.org --- drivers/staging/zram/zram_drv.c | 39

[PATCH v2 1/2] zsmalloc: add function to query object size

2012-11-28 Thread Nitin Gupta
and the start gives us the object size. Signed-off-by: Nitin Gupta ngu...@vflare.org --- drivers/staging/zsmalloc/zsmalloc-main.c | 177 +- drivers/staging/zsmalloc/zsmalloc.h |1 + 2 files changed, 127 insertions(+), 51 deletions(-) diff --git a/drivers/staging

[PATCH v2 2/2] zram: reduce metadata overhead

2012-11-28 Thread Nitin Gupta
field was needed only to mark a given page as zero-filled. Instead of this field, we now use an invalid value (-1) to mark such pages. Lastly, the count field was unused, so was simply removed. Signed-off-by: Nitin Gupta ngu...@vflare.org Reviewed-by: Jerome Marchand jmarc...@redhat.com

Re: [PATCH v2] zram: Fix use-after-free bug in disk write case

2012-11-29 Thread Nitin Gupta
On 11/28/2012 11:55 PM, Minchan Kim wrote: Hi Nitin, On Wed, Nov 28, 2012 at 11:45:06PM -0800, Nitin Gupta wrote: Changelog v2 vs v1: - Changelog message now correctly explains the problem Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On 11/28/2012 11:45 PM, Minchan Kim wrote: On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: Adds zs_get_object_size(handle) which provides the size of the given object. This is useful since the user (zram etc.) now do not have to maintain object sizes separately, saving on some

Re: zram: fix invalid memory references during disk write

2012-12-18 Thread Nitin Gupta
On Tue, Dec 11, 2012 at 10:27 AM, Greg KH gre...@linuxfoundation.org wrote: On Thu, Nov 29, 2012 at 10:45:09PM -0800, Nitin Gupta wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write. Invalid

Re: zram: fix invalid memory references during disk write

2012-12-18 Thread Nitin Gupta
On 12/18/2012 07:49 PM, Greg KH wrote: On Tue, Dec 18, 2012 at 01:12:05PM -0800, Nitin Gupta wrote: On Tue, Dec 11, 2012 at 10:27 AM, Greg KH gre...@linuxfoundation.org wrote: On Thu, Nov 29, 2012 at 10:45:09PM -0800, Nitin Gupta wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix

Re: zram: fix invalid memory references during disk write

2012-12-19 Thread Nitin Gupta
On 12/19/2012 07:08 AM, Greg KH wrote: On Tue, Dec 18, 2012 at 11:21:28PM -0800, Nitin Gupta wrote: On 12/18/2012 07:49 PM, Greg KH wrote: On Tue, Dec 18, 2012 at 01:12:05PM -0800, Nitin Gupta wrote: On Tue, Dec 11, 2012 at 10:27 AM, Greg KH gre...@linuxfoundation.org wrote: On Thu, Nov 29

Re: zram: fix invalid memory references during disk write

2012-12-19 Thread Nitin Gupta
On 12/19/2012 08:17 AM, Greg KH wrote: On Wed, Dec 19, 2012 at 07:53:36AM -0800, Nitin Gupta wrote: On 12/19/2012 07:08 AM, Greg KH wrote: On Tue, Dec 18, 2012 at 11:21:28PM -0800, Nitin Gupta wrote: On 12/18/2012 07:49 PM, Greg KH wrote: On Tue, Dec 18, 2012 at 01:12:05PM -0800, Nitin Gupta

Re: zram: fix invalid memory references during disk write

2012-12-20 Thread Nitin Gupta
On Wed, Dec 19, 2012 at 9:39 AM, Mitch Harder mitch.har...@sabayonlinux.org wrote: On Wed, Dec 19, 2012 at 11:21 AM, Nitin Gupta ngu...@vflare.org wrote: On 12/19/2012 08:17 AM, Greg KH wrote: On Wed, Dec 19, 2012 at 07:53:36AM -0800, Nitin Gupta wrote: On 12/19/2012 07:08 AM, Greg KH wrote

[PATCH][RESEND] staging: zram: fix invalid memory references during disk write

2013-01-02 Thread Nitin Gupta
. - Partial (non PAGE_SIZE) write with incompressible data: In this case, reference was made to a kfree()'ed buffer. Fixes bug 50081: https://bugzilla.kernel.org/show_bug.cgi?id=50081 Signed-off-by: Nitin Gupta ngu...@vflare.org Reported-by: Mihail Kasadjikov hamer...@gmail.com Reported-by: Tomas M

Re: [PATCH][RESEND] staging: zram: fix invalid memory references during disk write

2013-01-04 Thread Nitin Gupta
On Wed, Jan 2, 2013 at 8:53 AM, Nitin Gupta ngu...@vflare.org wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write. Invalid references could occur in two cases: - Incoming data expands

Re: zram: fix invalid memory references during disk write

2012-12-12 Thread Nitin Gupta
On 12/11/2012 10:27 AM, Greg KH wrote: On Thu, Nov 29, 2012 at 10:45:09PM -0800, Nitin Gupta wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write. Invalid references could occur in two cases

Re: zram: fix invalid memory references during disk write

2013-01-14 Thread Nitin Gupta
On Mon, Jan 14, 2013 at 11:19 AM, Greg KH gre...@linuxfoundation.org wrote: On Wed, Dec 19, 2012 at 11:39:15AM -0600, Mitch Harder wrote: On Wed, Dec 19, 2012 at 11:21 AM, Nitin Gupta ngu...@vflare.org wrote: On 12/19/2012 08:17 AM, Greg KH wrote: On Wed, Dec 19, 2012 at 07:53:36AM -0800

Re: [PATCH][RESEND] staging: zram: fix invalid memory references during disk write

2013-01-08 Thread Nitin Gupta
On Fri, Jan 4, 2013 at 12:25 PM, Nitin Gupta ngu...@vflare.org wrote: On Wed, Jan 2, 2013 at 8:53 AM, Nitin Gupta ngu...@vflare.org wrote: Fixes a bug introduced by commit c8f2f0db1 (zram: Fix handling of incompressible pages) which caused invalid memory references during disk write. Invalid

Correction to LZO1X

2007-07-11 Thread Nitin Gupta
Hi, This is correction for macro that gives worst case compressed data size by LZO1X. This patch was provided by the LZO author (Markus Oberhumer). Signed-off-by: Nitin Gupta [EMAIL PROTECTED] --- diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 582d8b7..d793497 100644

Re: Gmail and flowed text (was Re: Correction to LZO1X)

2007-07-13 Thread Nitin Gupta
On 7/13/07, Paolo Ciarrocchi [EMAIL PROTECTED] wrote: On 7/13/07, Tilman Schmidt [EMAIL PROTECTED] wrote: Satyam Sharma schrieb: Sorry for suddently jumping into the discussion, my understanding is that all the problems with Gmail are related to the web interface, if you don't use it, or

Re: [RFC] LZO de/compression support - take 6

2007-05-31 Thread Nitin Gupta
with crosscompilers. Finally I'm not too happy that you renamed the functions and #defines like LZO1X_WORKMEM_SIZE - please stay compatible with the official library version. Still a lot to do... - Nitin On 5/28/07, Nitin Gupta [EMAIL PROTECTED] wrote: This is kernel port of LZO1X-1 compressor

Re: [PATCH -mm 0/5] LZO and swap write failure patches for -mm

2007-06-04 Thread Nitin Gupta
alignment errors. Perhaps I was removed from the CC: list - could you point me at them? I've forwarded you the full mail. To quote Nitin Gupta: The author (Markus Oberhumer) of LZO provided these comments for this patch: [...] I've only briefly looked over it, but it's obvious that your

Re: [PATCH -mm 0/5] LZO and swap write failure patches for -mm

2007-06-04 Thread Nitin Gupta
Hey Guys, please calm down :) I now understand the memory alignment/other problems that author pointed out and I am working on same - will post version 7 soon. Thanks, Nitin - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED]

Re: [PATCH -mm 0/5] LZO and swap write failure patches for -mm

2007-06-04 Thread Nitin Gupta
all these feedback I got. Thanks, Nitin On 6/5/07, Adrian Bunk [EMAIL PROTECTED] wrote: On Mon, Jun 04, 2007 at 11:56:46PM +0530, Nitin Gupta wrote: On 6/4/07, Richard Purdie [EMAIL PROTECTED] wrote: ... The zlib code isn't kernel style and is arguably bloated, perhaps we should remove

[RFC] LZO de/compression support - take 7

2007-06-06 Thread Nitin Gupta
/lzo1x_decompress.c | 270 ++ lib/lzo1x/lzo1x_int.h| 87 ++ 7 files changed, 710 insertions(+), 0 deletions(-) Signed-off-by: Nitin Gupta [EMAIL PROTECTED] --- diff --git a/include/linux/lzo1x.h b/include/linux/lzo1x.h new file mode 100755 index

Re: [RFC] LZO de/compression support - take 7

2007-06-06 Thread Nitin Gupta
On 6/6/07, Christoph Hellwig [EMAIL PROTECTED] wrote: On Wed, Jun 06, 2007 at 06:04:17PM +0530, Nitin Gupta wrote: Hi, This is kernel port of LZO1X-1 compressor and LZO1X decompressor (safe version only). * Changes since 'take 6' (Full Changelog after this): 1) Fixed unaligned memory

Re: [PATCH -mm] Add LZO1X compression support to the kernel

2007-06-06 Thread Nitin Gupta
On 6/6/07, Richard Purdie [EMAIL PROTECTED] wrote: snip Nitin: Have you any objections to this version? If not, I'll finish analysing the PTR_ code changes and then hopefully we can get something into -mm... Your code now looks nice and clean. But I don't know what you want. I already spent

Re: [RFC] LZO de/compression support - take 7

2007-06-07 Thread Nitin Gupta
On 6/6/07, Nitin Gupta [EMAIL PROTECTED] wrote: On 6/6/07, Christoph Hellwig [EMAIL PROTECTED] wrote: On Wed, Jun 06, 2007 at 06:04:17PM +0530, Nitin Gupta wrote: Hi, This is kernel port of LZO1X-1 compressor and LZO1X decompressor (safe version only). * Changes since 'take 6' (Full

Re: [PATCH -mm] Add LZO1X compression support to the kernel

2007-06-07 Thread Nitin Gupta
On 6/7/07, Richard Purdie [EMAIL PROTECTED] wrote: On Thu, 2007-06-07 at 10:11 +0530, Nitin Gupta wrote: Your code now looks nice and clean. But I don't know what you want. I already spent lot of time on version 7 I posted and contains all those corrections which were suggested for my earlier

Re: LZO patch comparision

2007-06-07 Thread Nitin Gupta
On 6/7/07, Richard Purdie [EMAIL PROTECTED] wrote: In the following, - is Nitin's patch + is my version. + for (;;) { - DINDEX1(dindex, ip); + dindex = DMS((0x21 * DX3(ip,5,5,6)) 5, 0); m_pos = dict[dindex]; Probably makes sense to

[RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
irrelevant fot this port - Use of standard data types - Use memcpy() instead of COPY4 macros used in orig. code - Various macros - static inline functions - Code matches general kernel style - Various other cleanups suggested in reviews For now, tested on x86 only. Signed-off-by: Nitin Gupta [EMAIL

Re: [RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
Hi Michael, On 5/23/07, Michael-Luke Jones [EMAIL PROTECTED] wrote: On 23 May 2007, at 09:27, Nitin Gupta wrote: This contains LZO1X-1 compressor and LZO1X decompressor (safe and standard version). I understand that the 'safe' decompression code is 'somewhat slower' and that decompressor

Re: [RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
On 5/23/07, Michael-Luke Jones [EMAIL PROTECTED] wrote: Fair enough. However, this rather important issue is pretty much undocumented (source code comments don't count) If header file for public interface (linux/lzo1x.h documents about 'unsafe' vs. 'safe' then it should be enough. and

Re: [RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
On 5/23/07, Michael-Luke Jones [EMAIL PROTECTED] wrote: On 23 May 2007, at 15:03, Nitin Gupta wrote: Perhaps a rename is in order: lzo1x_decompress() = lzo1x_decompress_unsafe() lzo1x_decompress_safe = lzo1x_decompress() Or perhaps make reiserfs use _safe() instead - I think Richard has

Re: [RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
On 5/23/07, Richard Purdie [EMAIL PROTECTED] wrote: On Wed, 2007-05-23 at 09:16 -0700, Andrew Morton wrote: On Wed, 23 May 2007 19:51:44 +0530 Nitin Gupta [EMAIL PROTECTED] wrote: On 5/23/07, Michael-Luke Jones [EMAIL PROTECTED] wrote: If so, it was quite inappropriate that a filesystem

Re: [RFC] LZO de/compression support - take 3

2007-05-23 Thread Nitin Gupta
Hi Satyam, Thanks for you comments. On 5/24/07, Satyam Sharma [EMAIL PROTECTED] wrote: On 5/23/07, Nitin Gupta [EMAIL PROTECTED] wrote: diff --git a/include/linux/lzo1x.h b/include/linux/lzo1x.h [...] +/* Size of temp buffer (workmem) required by lzo1x_compress */ +#define

Re: [RFC] LZO de/compression support - take 3

2007-05-24 Thread Nitin Gupta
On 5/23/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/23/07, Nitin Gupta [EMAIL PROTECTED] wrote: For now, tested on x86 only. If you have a program to test this I can run it on an amd64 and a g4 ppc Attached is the kernel module (compress-test) to test this LZO code. Just compile

Re: [RFC] LZO de/compression support - take 3

2007-05-24 Thread Nitin Gupta
On 5/24/07, Richard Purdie [EMAIL PROTECTED] wrote: On Thu, 2007-05-24 at 01:04 +0530, Satyam Sharma wrote: On 5/23/07, Nitin Gupta [EMAIL PROTECTED] wrote: snip I remember this being mentioned. My answer was that this is the same behaviour as the zlib library and you do not want to alloc

Re: [RFC] LZO de/compression support - take 3

2007-05-24 Thread Nitin Gupta
On 5/24/07, Satyam Sharma [EMAIL PROTECTED] wrote: Hmm. The wrappers would clearly be inline, but if we want a common low-level decompress function, we'd also need to introduce the if (safe ) kind of tests for those differently-defined macros which could impact performance (for the _unsafe

Re: [RFC] LZO de/compression support - take 3

2007-05-24 Thread Nitin Gupta
On 5/25/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/24/07, Nitin Gupta [EMAIL PROTECTED] wrote: On 5/23/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/23/07, Nitin Gupta [EMAIL PROTECTED] wrote: For now, tested on x86 only. If you have a program to test this I can run it on an amd64

Re: [RFC] [-mm] Remove 'unsafe' LZO decompressor

2007-05-25 Thread Nitin Gupta
Hi Richard, Thanks for these perf. figures! On 5/25/07, Richard Purdie [EMAIL PROTECTED] wrote: On Thu, 2007-05-24 at 11:50 -0700, Andrew Morton wrote: On Thu, 24 May 2007 18:15:17 +0100 Michael-Luke Jones [EMAIL PROTECTED] wrote: Attached is a patch which may be desirable for -mm. It

Re: [RFC] [-mm] Remove 'unsafe' LZO decompressor

2007-05-25 Thread Nitin Gupta
Hi Markus, On 5/25/07, Markus F.X.J. Oberhumer [EMAIL PROTECTED] wrote: Please do _not_ rewrite the LZO implementation just for coding style principles. The current miniLZO implementation is _extrememly_ well tested, pretty optimized and quite portable. I agree that the implementation may

[RFC] LZO de/compression support - take 4

2007-05-25 Thread Nitin Gupta
++ 7 files changed, 652 insertions(+), 0 deletions(-) Signed-off-by: Nitin Gupta [EMAIL PROTECTED] --- diff --git a/include/linux/lzo1x.h b/include/linux/lzo1x.h new file mode 100755 index 000..11a6f23 --- /dev/null +++ b/include/linux/lzo1x.h @@ -0,0 +1,66 @@ +/* lzo1x.h -- public interface

Re: [RFC] LZO de/compression support - take 4

2007-05-25 Thread Nitin Gupta
Hi Richard, On 5/25/07, Richard Purdie [EMAIL PROTECTED] wrote: On Fri, 2007-05-25 at 17:15 +0530, Nitin Gupta wrote: Richard, can you please provide perf. results for this patch also? Also, can you please mail back latest version of your LZO patch? In meantime, I will try to include

Re: [RFC] LZO de/compression support - take 3

2007-05-25 Thread Nitin Gupta
On 5/25/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/24/07, Nitin Gupta [EMAIL PROTECTED] wrote: On 5/25/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/24/07, Nitin Gupta [EMAIL PROTECTED] wrote: On 5/23/07, Bret Towe [EMAIL PROTECTED] wrote: On 5/23/07, Nitin Gupta [EMAIL PROTECTED] wrote

Re: [RFC] LZO de/compression support - take 3

2007-05-26 Thread Nitin Gupta
Hi Pavel, Just did some benchmarking; results below. On 5/25/07, Pavel Machek [EMAIL PROTECTED] wrote: What is the performance difference between safe and unsafe version? File size: 256K - Following as tests for original test code - not any kernel port of this. - Test with each block size

Re: [RFC] LZO de/compression support - take 4

2007-05-26 Thread Nitin Gupta
Hi Richard, On 5/26/07, Richard Purdie [EMAIL PROTECTED] wrote: I've been looking at my benchmark figures and I think I've found why the figures for my version were different to yours. Its not your code which is at fault, its the way it was hooked into the benchmarking program. The compiler

Re: [RFC] LZO de/compression support - take 3

2007-05-26 Thread Nitin Gupta
Hi Bret, On 5/25/07, Bret Towe [EMAIL PROTECTED] wrote: [ 237.556167] LZO compress successful: orig_size=17448, comp_size=8183 [ 253.320760] LZO decompress successful: decomp_size=17448 2221c586e3eb869af7f4333d4f56b441b9aa8414 test-input 2e6c96b687274b629308b29835cebd3af989e0c7 output

[RFC] LZO de/compression support - take 5

2007-05-28 Thread Nitin Gupta
/lzo1x_int.h| 96 7 files changed, 669 insertions(+), 0 deletions(-) Signed-off-by: Nitin Gupta [EMAIL PROTECTED] --- b/include/linux/lzo1x.h new file mode 100755 index 000..11a6f23 --- /dev/null +++ b/include/linux/lzo1x.h @@ -0,0 +1,66 @@ +/* lzo1x.h -- public interface

Re: [RFC] LZO de/compression support - take 4

2007-05-28 Thread Nitin Gupta
On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: Test code for this version (take 4) of the minimized LZO1X (from the liblzo v2) is complete. I don't see a significant slow-down comparing the complete liblzo2 to this minimized code on my system (Pentium M 1.73GHz, 1GB Ram, Kubuntu Feisty

Re: [RFC] LZO de/compression support - take 4

2007-05-28 Thread Nitin Gupta
On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: On Monday 28 May 2007 04:37:04 Nitin Gupta wrote: On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: snip As you mentioned in your mail, you are using lzo1x_1_11_compress() which is slower than what I ported (which is same as what

Re: [RFC] LZO de/compression support - take 4

2007-05-28 Thread Nitin Gupta
On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: On Monday 28 May 2007 05:08:54 Nitin Gupta wrote: On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: On Monday 28 May 2007 04:37:04 Nitin Gupta wrote: On 5/28/07, Daniel Hazelton [EMAIL PROTECTED] wrote: New testbed based on minilzo

  1   2   3   4   5   >