[PATCH] block: Fix memory leak in alloc_disk_node()

2007-11-22 Thread Jerome Marchand
Fix a memory leak in alloc_disk_node(). Don't forget to free 'dkstats' when the allocation of 'part' failed. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- genhd.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/genhd.c b/block/genhd.c index e609996..f2ac914 100644

[Patch 0/8] Enhanced partition statistics

2007-12-13 Thread Jerome Marchand
Hi, Between 2.4 and 2.6, some I/O statistic informations concerning partitions disappeared as a result of earlier merging of requests. As a consequence, less statistics are available for partitions than for disks in sysfs and /proc/diskstats. This batch of patches brings back the lost

[Patch 1/8] Enhanced partition statistics: core statistics

2007-12-13 Thread Jerome Marchand
This patch contain the core infrastructure of enhanced partition statistics. It adds to struct hd_struct the same stats data as struct gendisk and define basics function to manipulate them. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- genhd.h | 129

[Patch 2/8] Enhanced partition statistics: update partition statitics

2007-12-13 Thread Jerome Marchand
Updates the enhanced partition statistics in generic block layer besides the disk statistics. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- block/ll_rw_blk.c | 40 fs/partitions/check.c |7 +++ include/linux/genhd.h |1 + 3 files

[Patch 3/8] Enhanced partition statistics: aoe fix

2007-12-13 Thread Jerome Marchand
Updates the enhanced partition statistics in ATA over Ethernet driver (not tested). Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- aoecmd.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/drivers/block/aoe

[Patch 4/8] Enhanced partition statistics: cciss fix

2007-12-13 Thread Jerome Marchand
Updates the enhanced partition statistics in cciss driver. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- cciss.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/drivers/block/cciss.c linux-2.6/drivers/block/cciss.c

[Patch 5/8] Enhanced partition statistics: cpqarray fix

2007-12-13 Thread Jerome Marchand
Updates the enhanced partition statistics in SMART2 driver (not tested). Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- cpqarray.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/drivers/block/cpqarray.c linux-2.6

[Patch 6/8] Enhanced partition statistics: sysfs

2007-12-13 Thread Jerome Marchand
Reports enhanced partition statistics in sysfs. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- check.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/fs/partitions/check.c linux-2.6/fs

[Patch 7/8] Enhanced partition statistics: procfs

2007-12-13 Thread Jerome Marchand
Reports enhanced partition statistics in /proc/diskstats. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- genhd.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/block/genhd.c linux-2.6/block

[Patch 8/8] Enhanced partition statistics: remove old partition statistics

2007-12-13 Thread Jerome Marchand
Removes the now unused old partition statistic code. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- block/ll_rw_blk.c |4 fs/partitions/check.c |2 -- include/linux/genhd.h |1 - 3 files changed, 7 deletions(-) diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6

Re: [Patch 7/8] Enhanced partition statistics: procfs

2007-12-13 Thread Jerome Marchand
Randy Dunlap wrote: The format of the /proc file is not changed except to add data at the end of each line. Is that correct? No. The line concerning partitions will display different data. The new format match the current format concerning disks. Current partition format: major minor

Re: [Patch 7/8] Enhanced partition statistics: procfs

2007-12-13 Thread Jerome Marchand
Randy Dunlap wrote: On Thu, 13 Dec 2007 18:36:45 +0100 Jerome Marchand wrote: Randy Dunlap wrote: The format of the /proc file is not changed except to add data at the end of each line. Is that correct? No. The line concerning partitions will display different data. The new format match

[PATCH] block layer: remove a unused argument of drive_stat_acct()

2007-10-22 Thread Jerome Marchand
The nr_sector argument of drive_stat_acct() is not used anymore since the read and write sectors statistics are now updated in end_that_request_first(). This patch removes the useless argument. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- ll_rw_blk.c | 12 ++-- 1 file changed

[PATCH] swap: redirty page if page write fails on swap file

2013-04-17 Thread Jerome Marchand
in. This patch sets the page dirty when direct_IO() fails. It fixes a memory corruption that happened while using swap-over-NFS. Signed-off-by: Jerome Marchand jmarc...@redhat.com --- mm/page_io.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index

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

2013-01-30 Thread Jerome Marchand
write_page from fs fs_lock -- deadlock This patch fixes it by using GFP_NOIO. In read path, we reorganize code flow so that kmap_atomic is called after the GFP_NOIO allocation. For the all series: Acked-by: Jerome Marchand jmarch...@redhat.com Cc: sta

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

2013-01-28 Thread Jerome Marchand
the problem. It'd be nice to know about the problem in more detail. I'm also curious on why you decided on GFP_ATOMIC for the read path and GFP_NOIO in the write path. This is because we're holding a kmap_atomic page in the read path. Jerome Cc: sta...@vger.kernel.org Cc: Jerome Marchand

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

2013-01-28 Thread Jerome Marchand
On 01/28/2013 02:26 PM, Pekka Enberg wrote: On Mon, Jan 28, 2013 at 1:24 PM, Jerome Marchand jmarc...@redhat.com wrote: On 01/28/2013 08:16 AM, Pekka Enberg wrote: On Mon, Jan 28, 2013 at 2:38 AM, Minchan Kim minc...@kernel.org wrote: Now zram allocates new page with GFP_KERNEL in zram I/O

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

2013-01-21 Thread Jerome Marchand
On 01/21/2013 06:21 AM, Minchan Kim 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. Cc: Jerome Marchand jmarc

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

2013-01-21 Thread Jerome Marchand
On 01/21/2013 06:21 AM, 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

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

2013-01-22 Thread Jerome Marchand
On 01/22/2013 01:07 AM, 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

[Patch 7/6] Enhanced partition statistics: documentation update

2008-02-05 Thread Jerome Marchand
Update the documentation to reflect the change in userspace interface. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- Documentation/ABI/testing/procfs-diskstats | 22 ++ Documentation/ABI/testing/sysfs-block | 28 +++ Documentation/iostats.txt

[Patch 4/6] Enhanced partition statistics: sysfs

2008-02-01 Thread Jerome Marchand
Reports enhanced partition statistics in sysfs. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- fs/partitions/check.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6.orig/fs/partitions/check.c linux

[Patch 2/6] Enhanced partition statistics: update partition statitics

2008-02-01 Thread Jerome Marchand
Updates the enhanced partition statistics in generic block layer besides the disk statistics. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- block/blk-core.c | 34 ++ block/blk-merge.c |6 ++ fs/partitions/check.c |7 +++ include

[Patch 1/6] Enhanced partition statistics: core statistics

2008-02-01 Thread Jerome Marchand
This patch contain the core infrastructure of enhanced partition statistics. It adds to struct hd_struct the same stats data as struct gendisk and define basics function to manipulate them. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- include/linux/genhd.h | 132

[Patch 0/6] Enhanced partition statistics

2008-02-01 Thread Jerome Marchand
comments ? Regards, Jerome Marchand -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[Patch 3/6] Enhanced partition statistics: aoe fix

2008-02-01 Thread Jerome Marchand
Updates the enhanced partition statistics in ATA over Ethernet driver (not tested). Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- drivers/block/aoe/aoecmd.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6.orig

[Patch 5/6] Enhanced partition statistics: procfs

2008-02-01 Thread Jerome Marchand
Reports enhanced partition statistics in /proc/diskstats. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- block/genhd.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6.orig/block/genhd.c linux

[Patch 6/6] Enhanced partition statistics: remove old partition statistics

2008-02-01 Thread Jerome Marchand
Removes the now unused old partition statistic code. Signed-off-by: Jerome Marchand [EMAIL PROTECTED] --- block/blk-core.c |4 fs/partitions/check.c |2 -- include/linux/genhd.h |1 - 3 files changed, 7 deletions(-) diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6

Re: Lockdep complain for zram

2012-11-22 Thread Jerome Marchand
try to take init_lock again, but in fact it doesn't. The device is not initialized yet, even less swapped on. The following (quickly tested) patch should prevent lockdep complain. Jerome --- From ebb3514c4ee18276da7c5ca08025991b493ac204 Mon Sep 17 00:00:00 2001 From: Jerome Marchand jmarc

Re: Lockdep complain for zram

2012-11-23 Thread Jerome Marchand
On 11/23/2012 12:34 AM, Minchan Kim wrote: On Thu, Nov 22, 2012 at 12:13:24PM +0100, Jerome Marchand wrote: On 11/21/2012 09: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

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

2012-11-27 Thread Jerome Marchand
On 11/27/2012 06:13 AM, Nitin Gupta wrote: 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

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

2012-11-27 Thread Jerome Marchand
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 was needed only to mark a given page as

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

2012-11-28 Thread Jerome Marchand
On 11/28/2012 03:35 AM, Minchan Kim 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. This patch allocates zram's

[PATCH 1/2] mm: factor commit limit calculation

2013-08-19 Thread Jerome Marchand
The same calculation is currently done in three different places. Factor that code so future changes has to be made at only one place. Signed-of-by: Jerome Marchand jmarc...@redhat.com --- fs/proc/meminfo.c|5 + include/linux/mman.h | 12 mm/mmap.c|4

[PATCH 2/2] mm: add overcommit_kbytes sysctl variable

2013-08-19 Thread Jerome Marchand
(on a 2TB machine it represents no less than 20GB). This patch adds the new overcommit_kbytes sysctl variable that allow a much finer grain. Signed-of-by: Jerome Marchand jmarc...@redhat.com --- Documentation/sysctl/vm.txt| 12 Documentation/vm/overcommit-accounting |7

Re: [PATCH 2/2] mm: add overcommit_kbytes sysctl variable

2013-08-20 Thread Jerome Marchand
On 08/19/2013 06:55 PM, Dave Hansen wrote: On 08/19/2013 08:17 AM, Jerome Marchand wrote: Some applications that run on HPC clusters are designed around the availability of RAM and the overcommit ratio is fine tuned to get the maximum usage of memory without swapping. With growing memory

Re: [PATCH 2/2] mm: add overcommit_kbytes sysctl variable

2013-08-21 Thread Jerome Marchand
On 08/19/2013 06:55 PM, Dave Hansen wrote: On 08/19/2013 08:17 AM, Jerome Marchand wrote: Some applications that run on HPC clusters are designed around the availability of RAM and the overcommit ratio is fine tuned to get the maximum usage of memory without swapping. With growing memory

Re: [PATCH 2/2] mm: add overcommit_kbytes sysctl variable

2013-08-22 Thread Jerome Marchand
On 08/21/2013 06:23 PM, Dave Hansen wrote: On 08/21/2013 08:22 AM, Jerome Marchand wrote: Instead of introducing yet another tunable, why don't we just make the ratio that comes in from the user more fine-grained? sysctl overcommit_ratio=0.2 We change the internal

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-09 Thread Jerome Marchand
On 09/09/2013 03:21 PM, Dan Carpenter wrote: On Mon, Sep 09, 2013 at 03:49:42PM +0300, Sergey Senozhatsky wrote: Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq.

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct (v2)

2013-09-09 Thread Jerome Marchand
On 09/09/2013 02:34 PM, Dan Carpenter wrote: On Fri, Sep 06, 2013 at 06:21:20PM +0300, Sergey Senozhatsky wrote: @@ -558,14 +563,12 @@ static void zram_reset_device(struct zram *zram, bool reset_capacity) flush_work(zram-free_work); down_write(zram-init_lock); -if

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-09 Thread Jerome Marchand
On 09/09/2013 03:46 PM, Jerome Marchand wrote: On 09/09/2013 03:21 PM, Dan Carpenter wrote: On Mon, Sep 09, 2013 at 03:49:42PM +0300, Sergey Senozhatsky wrote: Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process

Re: [PATCH v4 2/2] mm: allow to set overcommit ratio more precisely

2013-11-06 Thread Jerome Marchand
- Original Message - From: Andrew Morton a...@linux-foundation.org To: Jerome Marchand jmarc...@redhat.com Cc: linux...@kvack.org, linux-kernel@vger.kernel.org, dave hansen dave.han...@intel.com Sent: Wednesday, November 6, 2013 12:53:19 AM Subject: Re: [PATCH v4 2/2] mm: allow

Re: [PATCH v4 2/2] mm: allow to set overcommit ratio more precisely

2013-11-07 Thread Jerome Marchand
- Original Message - From: Dave Hansen dave.han...@intel.com To: Andrew Morton a...@linux-foundation.org, Jerome Marchand jmarc...@redhat.com Cc: linux...@kvack.org, linux-kernel@vger.kernel.org Sent: Thursday, November 7, 2013 12:49:54 AM Subject: Re: [PATCH v4 2/2] mm: allow

[PATCH v4 1/2] mm: factor commit limit calculation

2013-10-18 Thread Jerome Marchand
Change since v3: - rebase on 3.12-rc5 The same calculation is currently done in three differents places. Factor that code so future changes has to be made at only one place. Signed-off-by: Jerome Marchand jmarc...@redhat.com --- fs/proc/meminfo.c|5 + include/linux/mman.h | 12

[PATCH v4 2/2] mm: allow to set overcommit ratio more precisely

2013-10-18 Thread Jerome Marchand
that allow to set overcommit ratio with a part per million precision. The old overcommit_ratio variable can still be used to set and read the ratio with a 1% precision. That way, overcommit_ratio interface isn't broken in any way that I can imagine. Signed-off-by: Jerome Marchand jmarc

[PATCH v5] mm: add overcommit_kbytes sysctl variable

2013-12-03 Thread Jerome Marchand
. Signed-of-by: Jerome Marchand jmarc...@redhat.com --- Documentation/sysctl/vm.txt| 12 Documentation/vm/overcommit-accounting |7 --- include/linux/mm.h |5 + include/linux/mman.h |1 + kernel/sysctl.c

Re: [PATCH] zram: support REQ_DISCARD

2014-02-24 Thread Jerome Marchand
On 02/24/2014 06:51 AM, Joonsoo Kim wrote: zram is ram based block device and can be used by backend of filesystem. When filesystem deletes a file, it normally doesn't do anything on data block of that file. It just marks on metadata of that file. This behavior has no problem on disk based

Re: [PATCH] zram: support REQ_DISCARD

2014-02-24 Thread Jerome Marchand
On 02/24/2014 04:02 PM, Joonsoo Kim wrote: 2014-02-24 22:36 GMT+09:00 Jerome Marchand jmarc...@redhat.com: On 02/24/2014 06:51 AM, Joonsoo Kim wrote: zram is ram based block device and can be used by backend of filesystem. When filesystem deletes a file, it normally doesn't do anything on data

Re: [PATCH] zram: support REQ_DISCARD

2014-02-24 Thread Jerome Marchand
On 02/24/2014 04:56 PM, Joonsoo Kim wrote: 2014-02-25 0:15 GMT+09:00 Jerome Marchand jmarc...@redhat.com: On 02/24/2014 04:02 PM, Joonsoo Kim wrote: 2014-02-24 22:36 GMT+09:00 Jerome Marchand jmarc...@redhat.com: On 02/24/2014 06:51 AM, Joonsoo Kim wrote: zram is ram based block device

Re: [PATCH 1/2] zram: avoid null access when fail to alloc meta

2014-02-25 Thread Jerome Marchand
On 02/25/2014 02:08 AM, Minchan Kim wrote: zram_meta_alloc could be failed so caller should check it. Otherwise, your system will be hang. Cc: sta...@vger.kernel.org Signed-off-by: Minchan Kim minc...@kernel.org Acked-by: Jerome Marchand jmarc...@redhat.com --- drivers/block/zram

Re: [PATCH 2/2] zram: delete zram_init_device() function

2014-02-25 Thread Jerome Marchand
Senozhatsky sergey.senozhat...@gmail.com Signed-off-by: Minchan Kim minc...@kernel.org Acked-by: Jerome Marchand jmarc...@redhat.com --- drivers/block/zram/zram_drv.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/block/zram

Re: [PATCH v2] zram: support REQ_DISCARD

2014-02-26 Thread Jerome Marchand
On 02/26/2014 02:16 PM, Sergey Senozhatsky wrote: Hello, On (02/26/14 14:23), Joonsoo Kim wrote: zram is ram based block device and can be used by backend of filesystem. When filesystem deletes a file, it normally doesn't do anything on data block of that file. It just marks on metadata of

Re: [PATCH v2] zram: support REQ_DISCARD

2014-02-26 Thread Jerome Marchand
On 02/26/2014 02:57 PM, Sergey Senozhatsky wrote: On (02/26/14 14:44), Jerome Marchand wrote: On 02/26/2014 02:16 PM, Sergey Senozhatsky wrote: Hello, On (02/26/14 14:23), Joonsoo Kim wrote: zram is ram based block device and can be used by backend of filesystem. When filesystem deletes

Re: [PATCH] zram: move comp allocation out of init_lock

2014-03-05 Thread Jerome Marchand
. But that's an other problem than the one addressed in this patch: Acked-by: Jerome Marchand jmarc...@redhat.com down_write(zram-init_lock); if (init_done(zram)) { + up_write(zram-init_lock); pr_info(Cannot change disksize for initialized device\n

Re: [PATCH 7/7] zram: remove unnecessary lock

2014-01-14 Thread Jerome Marchand
On 01/13/2014 12:19 PM, Minchan Kim wrote: read/write lock's performance is really bad compared to mutex_lock in write most workload.(AFAIR, recenlty there were some effort to enhance it but not sure it got merged). Anyway, we don't need such big granuarity read-write lock any more so this

Re: [PATCH 3/3] zram: rework reported to end-user zram statistics

2014-01-14 Thread Jerome Marchand
On 01/14/2014 10:37 AM, Sergey Senozhatsky wrote: 1) Introduce ZRAM_ATTR_RO macro to generate zram atomic64_t stats `show' functions and reduce code duplication. 2) Account and report back to user numbers of failed READ and WRITE operations. 3) Remove `good' and `bad' compressed

Re: [PATCH 2/3] zram: do not pass rw argument to __zram_make_request()

2014-01-14 Thread Jerome Marchand
On 01/14/2014 10:37 AM, Sergey Senozhatsky wrote: Do not pass rw argument down the __zram_make_request() - zram_bvec_rw() chain, decode it in zram_bvec_rw() instead. Besides, this is the place where we distinguish READ (+READ AHEAD) and WRITE bio data directions, so account zram RW stats here,

Re: [PATCH 1/3] zram: drop `init_done' struct zram member

2014-01-14 Thread Jerome Marchand
-by: Jerome Marchand jmarc...@redhat.com --- drivers/block/zram/zram_drv.c | 21 +++-- drivers/block/zram/zram_drv.h | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 011e55d..c323e05 100644

Re: [PATCH 3/3] zram: rework reported to end-user zram statistics

2014-01-14 Thread Jerome Marchand
On 01/14/2014 11:57 AM, Sergey Senozhatsky wrote: Hello Jerome, On (01/14/14 11:38), Jerome Marchand wrote: On 01/14/2014 10:37 AM, Sergey Senozhatsky wrote: 1) Introduce ZRAM_ATTR_RO macro to generate zram atomic64_t stats `show' functions and reduce code duplication. 2) Account

Re: [PATCH 2/3] zram: do not pass rw argument to __zram_make_request()

2014-01-14 Thread Jerome Marchand
On 01/14/2014 12:13 PM, Sergey Senozhatsky wrote: On (01/14/14 12:02), Jerome Marchand wrote: static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, - int offset, struct bio *bio, int rw) + int offset, struct bio *bio) { int ret

Re: [PATCH 3/3] zram: rework reported to end-user zram statistics

2014-01-14 Thread Jerome Marchand
On 01/14/2014 12:10 PM, Sergey Senozhatsky wrote: On (01/14/14 11:38), Jerome Marchand wrote: On 01/14/2014 10:37 AM, Sergey Senozhatsky wrote: 1) Introduce ZRAM_ATTR_RO macro to generate zram atomic64_t stats `show' functions and reduce code duplication. 2) Account and report back to user

Re: [PATCH 3/3] zram: rework reported to end-user zram statistics

2014-01-14 Thread Jerome Marchand
On 01/14/2014 02:53 PM, Sergey Senozhatsky wrote: On (01/14/14 14:43), Jerome Marchand wrote: [..] That's weird: good/bad_compress are accounted, but it seems to me that they are to never used in any way. If so, there is indeed no reason to keep them. Account each sub-request compression

Re: [PATCH 3/3] zram: rework reported to end-user zram statistics

2014-01-14 Thread Jerome Marchand
On 01/14/2014 03:09 PM, Sergey Senozhatsky wrote: On (01/14/14 15:02), Jerome Marchand wrote: On 01/14/2014 02:53 PM, Sergey Senozhatsky wrote: On (01/14/14 14:43), Jerome Marchand wrote: [..] That's weird: good/bad_compress are accounted, but it seems to me that they are to never used

Re: [PATCH] swap: redirty page if page write fails on swap file

2013-05-03 Thread Jerome Marchand
On 05/01/2013 09:39 AM, Simon Jeons wrote: Ping, ;-) On 04/18/2013 08:13 AM, Simon Jeons wrote: Hi Jerome, On 04/17/2013 08:11 PM, Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails

Re: [RFC PATCH v1 1/8] zram: simplify and optimize zram_to_dev()

2013-06-04 Thread Jerome Marchand
Hi, Please write a commit message, no matter how straightforward a patch may seem to you. Also the subject suffers from dyslexia: it's dev_to_zram, not zram_to_dev. Thanks, Jerome On 06/03/2013 05:42 PM, Jiang Liu wrote: Signed-off-by: Jiang Liu jiang@huawei.com ---

Re: [RFC PATCH v1 6/8] zram: avoid access beyond the zram device

2013-06-04 Thread Jerome Marchand
On 06/03/2013 05:42 PM, Jiang Liu wrote: Function valid_io_request() should verify the entire request doesn't exceed the zram device, otherwise it will cause invalid memory access. Signed-off-by: Jiang Liu jiang@huawei.com --- drivers/staging/zram/zram_drv.c | 4 1 file changed,

Re: [RFC PATCH v1 5/8] zram: avoid double free in error recovery path of zram_bvec_write()

2013-06-04 Thread Jerome Marchand
The patch seems right, but the title is wrong: this is not a error recovery path. Also, the description is missing again. Jerome On 06/03/2013 05:42 PM, Jiang Liu wrote: Signed-off-by: Jiang Liu jiang@huawei.com --- drivers/staging/zram/zram_drv.c | 2 -- 1 file changed, 2 deletions(-)

Re: [RFC PATCH v1 6/8] zram: avoid access beyond the zram device

2013-06-05 Thread Jerome Marchand
On 06/04/2013 05:09 PM, Jiang Liu wrote: On Tue 04 Jun 2013 09:15:43 PM CST, Jerome Marchand wrote: On 06/03/2013 05:42 PM, Jiang Liu wrote: Function valid_io_request() should verify the entire request doesn't exceed the zram device, otherwise it will cause invalid memory access. Signed-off

Re: [PATCH v2 01/10] zram: kill unused zram_get_num_devices()

2013-06-05 Thread Jerome Marchand
Hi Jiang, Could you please state the changes that happened between v1 and v2. That would be really helpful to the reviewers, and probably even more useful to the maintainer. Thanks, Jerome On 06/04/2013 06:05 PM, Jiang Liu wrote: Now there's no caller of zram_get_num_devices(), so kill it.

Re: [PATCH v2 03/10] zram: use zram-lock to protect zram_free_page() in swap free notify path

2013-06-05 Thread Jerome Marchand
On 06/04/2013 06:06 PM, Jiang Liu wrote: zram_free_page() is protected by down_write(zram-lock) when called by zram_bvec_write(), but there's no such protection when called by zram_slot_free_notify(), which may cause wrong states to zram object. There are two possible consequences of this

Re: [PATCH v2 04/10] zram: destroy all devices on error recovery path in zram_init()

2013-06-05 Thread Jerome Marchand
-by: Jerome Marchand jmarc...@redhat.com -- 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: [PATCH v2 10/10] zram: use atomic64_xxx() to replace zram_stat64_xxx()

2013-06-05 Thread Jerome Marchand
On 06/04/2013 06:06 PM, Jiang Liu wrote: Use atomic64_xxx() to replace open-coded zram_stat64_xxx(). Some architectures have native support of atomic64 operations, so we can get rid of the spin_lock() in zram_stat64_xxx(). On the other hand, for platforms use generic version of atomic64

Re: [PATCH v2 10/10] zram: use atomic64_xxx() to replace zram_stat64_xxx()

2013-06-06 Thread Jerome Marchand
On 06/05/2013 06:21 PM, Jiang Liu wrote: On Wed 05 Jun 2013 08:02:12 PM CST, Jerome Marchand wrote: On 06/04/2013 06:06 PM, Jiang Liu wrote: Use atomic64_xxx() to replace open-coded zram_stat64_xxx(). Some architectures have native support of atomic64 operations, so we can get rid

Re: [PATCH v2 10/10] zram: use atomic64_xxx() to replace zram_stat64_xxx()

2013-06-06 Thread Jerome Marchand
On 06/06/2013 04:36 PM, Jiang Liu wrote: On Thu 06 Jun 2013 05:37:19 PM CST, Jerome Marchand wrote: On 06/05/2013 06:21 PM, Jiang Liu wrote: On Wed 05 Jun 2013 08:02:12 PM CST, Jerome Marchand wrote: On 06/04/2013 06:06 PM, Jiang Liu wrote: Use atomic64_xxx() to replace open-coded

Re: [PATCH v3 01/10] zram: avoid invalid memory access in zram_exit()

2013-06-07 Thread Jerome Marchand
) and zram_reset_device(zram), that will cause deadlock issues to the zram sysfs handler. So fix it by holding an extra reference to zram-disk before calling destroy_device(zram). Signed-off-by: Jiang Liu jiang@huawei.com Cc: sta...@vger.kernel.org Acked-by: Jerome Marchand jmarc...@redhat.com

Re: [PATCH v3 02/10] zram: use zram-lock to protect zram_free_page() in swap free notify path

2013-06-07 Thread Jerome Marchand
on zram-lock before calling zram_free_page(). Signed-off-by: Jiang Liu jiang@huawei.com Cc: sta...@vger.kernel.org Acked-by: Jerome Marchand jmarch...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [PATCH v2 05/10] zram: avoid double free in function zram_bvec_write()

2013-06-07 Thread Jerome Marchand
-by: Jerome Marchand jmarc...@redhat.com -- 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: [PATCH v3 05/10] zram: avoid access beyond the zram device

2013-06-07 Thread Jerome Marchand
On 06/07/2013 10:09 AM, Minchan Kim wrote: On Fri, Jun 07, 2013 at 12:07:26AM +0800, Jiang Liu wrote: Function valid_io_request() should verify the entire request are within the zram device address range. Otherwise it may cause invalid memory access when accessing/modifying

Re: [PATCH v3 06/10] zram: protect sysfs handler from invalid memory access

2013-06-07 Thread Jerome Marchand
true; do echo 8M disksize; echo 1 reset; done Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: Minchan Kim minc...@kernel.org Cc: sta...@vger.kernel.org Acked-by: Jerome Marchand jmarc...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] swap: redirty page if page write fails on swap file

2013-04-24 Thread Jerome Marchand
On 04/22/2013 10:37 PM, Andrew Morton wrote: On Wed, 17 Apr 2013 14:11:55 +0200 Jerome Marchand jmarc...@redhat.com wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and is therefore handled afterwards

Re: [PATCH v7 1/3] Staging: zram: Fix access of NULL pointer

2013-10-30 Thread Jerome Marchand
. Hence, this patch introduces a check for bdev to prevent reference to a NULL pointer in the later part of the code. It also removes unnecessary check of bdev for fsync_bdev(). Cc: sta...@vger.kernel.org Signed-off-by: Rashika Kheria rashika.khe...@gmail.com Acked-by: Jerome Marchand jmarc

Re: [PATCH v7 3/3] Staging: zram: Fix variable dereferenced before check

2013-10-30 Thread Jerome Marchand
...@kernel.org Signed-off-by: Rashika Kheria rashika.khe...@gmail.com Acked-by: Jerome Marchand jmarc...@redhat.com --- drivers/staging/zram/zram_drv.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c

Re: [PATCH v9 2/2] Staging: zram: Fix decrement of variable by calling bdput()

2013-11-01 Thread Jerome Marchand
On 10/31/2013 12:58 PM, Rashika Kheria wrote: As suggested by Jerome Marchand The code in reset_store get the block device The credit should actually go to Minchan. He found the bug. I merely explained it. (bdget_disk()) but it does not put it (bdput()) when it's done using it. The usage count

[PATCH 2/2 v2] mm: allow to set overcommit ratio more precisely

2013-09-05 Thread Jerome Marchand
overcommit_ratio variable can still be used to set and read the ratio with a 1% precision. That way, overcommit_ratio interface isn't broken in any way that I can imagine. Signed-off-by: Jerome Marchand jmarc...@redhat.com --- include/linux/mman.h |6 ++-- include/linux/sysctl.h |2 + kernel

Re: [PATCH 2/2 v2] mm: allow to set overcommit ratio more precisely

2013-09-05 Thread Jerome Marchand
On 09/05/2013 04:41 PM, Dave Hansen wrote: On 09/05/2013 05:51 AM, Jerome Marchand wrote: This patch adds the new overcommit_ratio_ppm sysctl variable that allow to set overcommit ratio with a part per million precision. The old overcommit_ratio variable can still be used to set and read

Re: [PATCH 2/2 v2] mm: allow to set overcommit ratio more precisely

2013-09-06 Thread Jerome Marchand
On 09/06/2013 12:11 AM, Pavel Machek wrote: hi! This patch adds the new overcommit_ratio_ppm sysctl variable that allow to set overcommit ratio with a part per million precision. The old overcommit_ratio variable can still be used to set and read the ratio with a 1% precision. That way,

[PATCH 2/2 v3] mm: allow to set overcommit ratio more precisely

2013-09-06 Thread Jerome Marchand
with a part per million precision. The old overcommit_ratio variable can still be used to set and read the ratio with a 1% precision. That way, overcommit_ratio interface isn't broken in any way that I can imagine. Signed-off-by: Jerome Marchand jmarc...@redhat.com --- Documentation/sysctl/vm.txt

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage

2013-09-06 Thread Jerome Marchand
On 09/06/2013 03:47 PM, Sergey Senozhatsky wrote: Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq. handle_pending_slot_free() only when current detects that slot_free_rq is not NULL.

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct

2013-09-06 Thread Jerome Marchand
On 09/06/2013 03:52 PM, Sergey Senozhatsky wrote: `zram-init_done != 0' equals to `zram-meta != NULL', so init_done can be removed. The name init_done is self explanatory, meta isn't. You could for instance write a function with an explicit name to test for initialization. Jerome

[PATCH] mm: compaction: update comment about zone lock in isolate_freepages_block

2013-08-30 Thread Jerome Marchand
Since commit f40d1e4 (mm: compaction: acquire the zone-lock as late as possible), isolate_freepages_block() takes the zone-lock itself. The function description however still states that the zone-lock must be held. This patch removes this outdated statement. Signed-off-by: Jerome Marchand jmarc

Re: [PATCH staging-next] zram: protect zram_reset_device() call

2013-07-03 Thread Jerome Marchand
-by: Jerome Marchand jmarch...@redhat.com -- 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: [PATCH -mm v2 04/11] pagewalk: move pmd_trans_huge_lock() from callbacks to common code

2014-06-17 Thread Jerome Marchand
On 06/12/2014 11:48 PM, Naoya Horiguchi wrote: Now all of current users of page table walker are canonicalized, i.e. pmd_entry() handles only trans_pmd entry, and pte_entry() handles pte entry. So we can factorize common code more. This patch moves pmd_trans_huge_lock() in each pmd_entry() to

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/17/2014 06:55 AM, Chen Yucong wrote: Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find the following snippet in

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/18/2014 11:08 AM, Chen Yucong wrote: On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: if (!nr_file || !nr_anon) break; - if (nr_file nr_anon) { - unsigned long scan_target = targets[LRU_INACTIVE_ANON

Re: [PATCH v2 0/4]zram: locking redesign

2014-01-15 Thread Jerome Marchand
drivers/staging/zram/zram_drv.h | 27 +++--- 2 files changed, 51 insertions(+), 93 deletions(-) The new locking scheme seems sound to me. Acked-by: Jerome Marchand jmarc...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

[PATCH] powerpc: mm: fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed address space

2014-01-15 Thread Jerome Marchand
corrects it. Signed-off-by: Jerome Marchand jmarc...@redhat.com --- arch/powerpc/mm/slice.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 7ce9cf3..b0c75cc 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm

Re: [PATCHv2 3/4] zram: rework reported to end-user zram statistics

2014-01-16 Thread Jerome Marchand
warnings are part of documentation, not the source code. Yet you didn't update the documentation. Jerome -ss 6. Removed unused field of enum zram_pageflags Looks good to me. Please, separate it with each patches so let's focus one by one. Acked-by: Jerome Marchand jmarc

Re: [PATCHv2 4/4] zram: report failed read and writes stats

2014-01-16 Thread Jerome Marchand
sergey.senozhat...@gmail.com Acked-by: Minchan Kim minc...@kernel.org This of course depends on third patch, but since I have no objection to the ZRAM_ATTR_RO() macro part: Acked-by: Jerome Marchand jmarc...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCHv3 3/8] zram: remove good and bad compress stats

2014-01-16 Thread Jerome Marchand
-by: Sergey Senozhatsky sergey.senozhat...@gmail.com Acked-by: Jerome Marchand jmarc...@redhat.com --- drivers/block/zram/zram_drv.c | 11 --- drivers/block/zram/zram_drv.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c

Re: [PATCHv3 7/8] zram: drop not used table `count' member

2014-01-16 Thread Jerome Marchand
On 01/16/2014 02:12 PM, Sergey Senozhatsky wrote: struct table `count' member is not used. What was the intended use of this counter anyway? Signed-off-by: Sergey Senozhatsky sergey.senozhat...@gmail.com --- drivers/block/zram/zram_drv.h | 1 - 1 file changed, 1 deletion(-) diff --git

  1   2   3   4   5   >