[V2][PATCH] vt: keyboard, fix uninitialized variables warning

2021-03-03 Thread Li Wang
-uninitialized] kfree(kbs); ^~ Signed-off-by: Li Wang --- drivers/tty/vt/keyboard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 7763862..62f1ecb 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c

[PATCH] vt: keyboard, fix uninitialized variables warning

2021-03-03 Thread Li Wang
[-Wmaybe-uninitialized] kfree(kbs); ^~ Signed-off-by: Li Wang --- drivers/tty/vt/keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 7763862..3e73d55 100644 --- a/drivers/tty/vt/keyboard.c +++ b

[PATCH] vhost: reduce stack usage in log_used

2020-09-14 Thread Li Wang
Fix the warning: [-Werror=-Wframe-larger-than=] drivers/vhost/vhost.c: In function log_used: drivers/vhost/vhost.c:1906:1: warning: the frame size of 1040 bytes is larger than 1024 bytes Signed-off-by: Li Wang --- drivers/vhost/vhost.c | 2 +- drivers/vhost/vhost.h | 1 + 2 files changed, 2

[PATCH] vhost: reduce stack usage in log_used

2020-09-11 Thread Li Wang
Fix the warning: [-Werror=-Wframe-larger-than=] drivers/vhost/vhost.c: In function log_used: drivers/vhost/vhost.c:1906:1: warning: the frame size of 1040 bytes is larger than 1024 bytes Signed-off-by: Li Wang --- drivers/vhost/vhost.c | 14 ++ 1 file changed, 10 insertions(+), 4

[5.3.0-rc4 Bug] WARNING: CPU: 17 PID: 25085 at lib/list_debug.c:47 __list_del_entry_valid+0x4e/0x90

2019-08-21 Thread Li Wang
m_region_hash dm_log dm_mod -- Regards, Li Wang

Re: ltp/read_all_sys (read_all -d /sys -q -r 10) cause system panic with kernel-4.18.0-rc1

2018-07-04 Thread Li Wang
ptsas libata nvme_fc scsi_transport_sas nvme_fabrics mptscsih nvme_core crc32c_intel mptbase scsi_transport_fc dca i2c_algo_bit dm_mirror dm_region_hash dm_log dm_mod [ 8162.621090] CR2: 00b8 On Tue, Jun 19, 2018 at 6:41 PM, Li Wang wrote: > Hi, > > I'm hitting this p

Re: ltp/read_all_sys (read_all -d /sys -q -r 10) cause system panic with kernel-4.18.0-rc1

2018-07-04 Thread Li Wang
ptsas libata nvme_fc scsi_transport_sas nvme_fabrics mptscsih nvme_core crc32c_intel mptbase scsi_transport_fc dca i2c_algo_bit dm_mirror dm_region_hash dm_log dm_mod [ 8162.621090] CR2: 00b8 On Tue, Jun 19, 2018 at 6:41 PM, Li Wang wrote: > Hi, > > I'm hitting this p

Re: [PATCH v2] zswap: re-check zswap_is_full after do zswap_shrink

2018-06-25 Thread Li Wang
On 30 May 2018 at 20:53, Dan Streetman wrote: > On Wed, May 30, 2018 at 6:39 AM, Li Wang wrote: >> The '/sys/../zswap/stored_pages:' keep raising in zswap test with >> "zswap.max_pool_percent=0" parameter. But theoretically, it should >> not compres

Re: [PATCH v2] zswap: re-check zswap_is_full after do zswap_shrink

2018-06-25 Thread Li Wang
On 30 May 2018 at 20:53, Dan Streetman wrote: > On Wed, May 30, 2018 at 6:39 AM, Li Wang wrote: >> The '/sys/../zswap/stored_pages:' keep raising in zswap test with >> "zswap.max_pool_percent=0" parameter. But theoretically, it should >> not compres

ltp/read_all_sys (read_all -d /sys -q -r 10) cause system panic with kernel-4.18.0-rc1

2018-06-19 Thread Li Wang
ltp_insmod01] [ 5916.043814] CR2: 00b8 [ 5916.047513] BUG: unable to handle kernel NULL pointer dereference at 00b8 [ 5916.047537] ---[ end trace 1dddacfb06305174 ]--- -- Regards, Li Wang

ltp/read_all_sys (read_all -d /sys -q -r 10) cause system panic with kernel-4.18.0-rc1

2018-06-19 Thread Li Wang
ltp_insmod01] [ 5916.043814] CR2: 00b8 [ 5916.047513] BUG: unable to handle kernel NULL pointer dereference at 00b8 [ 5916.047537] ---[ end trace 1dddacfb06305174 ]--- -- Regards, Li Wang

[PATCH v2] zswap: re-check zswap_is_full after do zswap_shrink

2018-05-30 Thread Li Wang
p changing. To solve the issue, this patch adds zswap_is_full() check again after zswap_shrink() to make sure it's now under the max_pool_percent, and not to compress/store if reach its limitaion. Signed-off-by: Li Wang Cc: Seth Jennings Cc: Dan Streetman Cc: Huang Ying Cc: Yu Zhao ---

[PATCH v2] zswap: re-check zswap_is_full after do zswap_shrink

2018-05-30 Thread Li Wang
p changing. To solve the issue, this patch adds zswap_is_full() check again after zswap_shrink() to make sure it's now under the max_pool_percent, and not to compress/store if reach its limitaion. Signed-off-by: Li Wang Cc: Seth Jennings Cc: Dan Streetman Cc: Huang Ying Cc: Yu Zhao ---

[PATCH RFC] zswap: reject to compress/store page if zswap_max_pool_percent is 0

2018-05-24 Thread Li Wang
k(). If the pool size has been shrinked a little success, zswap will do compress/store pages again. Then we get fails on that as above. Signed-off-by: Li Wang <liw...@redhat.com> Cc: Seth Jennings <sjenn...@redhat.com> Cc: Dan Streetman <ddstr...@ieee.org> Cc: Huang Y

[PATCH RFC] zswap: reject to compress/store page if zswap_max_pool_percent is 0

2018-05-24 Thread Li Wang
k(). If the pool size has been shrinked a little success, zswap will do compress/store pages again. Then we get fails on that as above. Signed-off-by: Li Wang Cc: Seth Jennings Cc: Dan Streetman Cc: Huang Ying Cc: Yu Zhao --- mm/zswap.c | 5 + 1 file changed, 5 insertions(+) dif

linux/drivers/cpuidle: cpuidle_enter_state() issue

2018-02-06 Thread Li Wang
x14 -8<--- Any response will be appreciated! -- Regards, Li Wang Email: wangli.a...@gmail.com

linux/drivers/cpuidle: cpuidle_enter_state() issue

2018-02-06 Thread Li Wang
x14 -8<--- Any response will be appreciated! -- Regards, Li Wang Email: wangli.a...@gmail.com

Re: [PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-11-08 Thread Li Wang
On Thu, Oct 26, 2017 at 6:16 PM, Martin Schwidefsky <schwidef...@de.ibm.com> wrote: > On Thu, 26 Oct 2017 17:47:39 +0800 > Li Wang <liw...@redhat.com> wrote: > >> On Thu, Oct 26, 2017 at 5:26 PM, Martin Schwidefsky >> <schwidef...@de.ibm.com> wrote: >>

Re: [PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-11-08 Thread Li Wang
On Thu, Oct 26, 2017 at 6:16 PM, Martin Schwidefsky wrote: > On Thu, 26 Oct 2017 17:47:39 +0800 > Li Wang wrote: > >> On Thu, Oct 26, 2017 at 5:26 PM, Martin Schwidefsky >> wrote: >> > On Thu, 26 Oct 2017 15:36:10 +0800 >> > Li Wang wrote: >> >

Re: [PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-10-26 Thread Li Wang
On Thu, Oct 26, 2017 at 5:26 PM, Martin Schwidefsky <schwidef...@de.ibm.com> wrote: > On Thu, 26 Oct 2017 15:36:10 +0800 > Li Wang <liw...@redhat.com> wrote: > >> That would be very hard to get -ENOMEM returned in crst_table_upgrade() >> because the condition(a

Re: [PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-10-26 Thread Li Wang
On Thu, Oct 26, 2017 at 5:26 PM, Martin Schwidefsky wrote: > On Thu, 26 Oct 2017 15:36:10 +0800 > Li Wang wrote: > >> That would be very hard to get -ENOMEM returned in crst_table_upgrade() >> because the condition(addr + len <= TASK_SIZE) makes all 'end' value

[PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-10-26 Thread Li Wang
off-by: Li Wang <liw...@redhat.com> --- arch/s390/mm/mmap.c| 6 ++ arch/s390/mm/pgalloc.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 5bea139..8ddb13a 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c

[PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-10-26 Thread Li Wang
off-by: Li Wang --- arch/s390/mm/mmap.c| 6 ++ arch/s390/mm/pgalloc.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 5bea139..8ddb13a 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -119,6 +11

[BUG] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c53df

2017-06-06 Thread Li Wang
or: pHyp Virtualization type: para L1d cache: 64K L1i cache: 32K NUMA node0 CPU(s): 0-15 NUMA node1 CPU(s): -- Li Wang liw...@redhat.com

[BUG] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c53df

2017-06-06 Thread Li Wang
cache: 64K L1i cache: 32K NUMA node0 CPU(s): 0-15 NUMA node1 CPU(s): -- Li Wang liw...@redhat.com

Re: [PATCH v2] vfs: fix put_compat_statfs64() does not handle errors

2016-11-28 Thread Li Wang
sorry, ping for comments~ On 15 November 2016 at 17:19, Li Wang <liw...@redhat.com> wrote: > put_compat_statfs64() does NOT return -1 and setting errno to EOVERFLOW > when some variables(like: f_bsize) overflowed in the returned struct. > > The reason is that the ubuf->f

Re: [PATCH v2] vfs: fix put_compat_statfs64() does not handle errors

2016-11-28 Thread Li Wang
sorry, ping for comments~ On 15 November 2016 at 17:19, Li Wang wrote: > put_compat_statfs64() does NOT return -1 and setting errno to EOVERFLOW > when some variables(like: f_bsize) overflowed in the returned struct. > > The reason is that the ubuf->f_blocks is __u64 ty

[PATCH v2] vfs: fix put_compat_statfs64() does not handle errors

2016-11-15 Thread Li Wang
zeof f_bsize = 4, f_bsize=0 Signed-off-by: Li Wang <liw...@redhat.com> --- fs/compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/compat.c b/fs/compat.c index bd064a2..543b48c 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -253,9 +253,9 @@ static int put_c

[PATCH v2] vfs: fix put_compat_statfs64() does not handle errors

2016-11-15 Thread Li Wang
zeof f_bsize = 4, f_bsize=0 Signed-off-by: Li Wang --- fs/compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/compat.c b/fs/compat.c index bd064a2..543b48c 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -253,9 +253,9 @@ static int put_compat_statfs(struct compat_s

Re: [PATCH] vfs: fix statfs64() does not handle errors

2016-11-14 Thread Li Wang
On Mon, Nov 07, 2016 at 11:03:11AM -0700, Andreas Dilger wrote: > On Nov 7, 2016, at 3:21 AM, Li Wang <liw...@redhat.com> wrote: > > > > statfs64() does NOT return -1 and setting errno to EOVERFLOW when some > > variables(like: f_bsize) overflowed in the returned

Re: [PATCH] vfs: fix statfs64() does not handle errors

2016-11-14 Thread Li Wang
On Mon, Nov 07, 2016 at 11:03:11AM -0700, Andreas Dilger wrote: > On Nov 7, 2016, at 3:21 AM, Li Wang wrote: > > > > statfs64() does NOT return -1 and setting errno to EOVERFLOW when some > > variables(like: f_bsize) overflowed in the returned struct. > > >

[PATCH] vfs: fix statfs64() does not handle errors

2016-11-07 Thread Li Wang
return 0; } $ gcc -m32 statfs64_test.c $ ./a.out sizeof f_bsize = 4, f_bsize=0 Signed-off-by: Li Wang <liw...@redhat.com> --- Notes: This is my first patch to kernel fs part, I'm not sure if this one useful, but just want someone have a look. thanks~ fs/statfs.c | 17 +++

[PATCH] vfs: fix statfs64() does not handle errors

2016-11-07 Thread Li Wang
return 0; } $ gcc -m32 statfs64_test.c $ ./a.out sizeof f_bsize = 4, f_bsize=0 Signed-off-by: Li Wang --- Notes: This is my first patch to kernel fs part, I'm not sure if this one useful, but just want someone have a look. thanks~ fs/statfs.c | 17 + 1 fil

mtd: put flash block erasing into wait queue, if has any thread in queue

2014-08-14 Thread Li Wang
flash erasing maybe block writing operation. make erasing operation sleep, when the other thread is in wait queue. -- 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

[PATCH] mtd: put flash block erasing into wait queue, if has any thread in queue

2014-08-14 Thread Li Wang
xff586a0 LR = 0xff58608 = So, if there is any thread in wait queue, puts erasing operation into queue. It makes writing operation have chance to run. Signed-off-by: Li Wang --- drivers/mtd/chips/cfi_cmdset_0002.c | 13 + 1 file changed, 13 insertions(+) diff --git a/d

[PATCH] mtd: put flash block erasing into wait queue, if has any thread in queue

2014-08-14 Thread Li Wang
= So, if there is any thread in wait queue, puts erasing operation into queue. It makes writing operation have chance to run. Signed-off-by: Li Wang li.w...@windriver.com --- drivers/mtd/chips/cfi_cmdset_0002.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mtd

mtd: put flash block erasing into wait queue, if has any thread in queue

2014-08-14 Thread Li Wang
flash erasing maybe block writing operation. make erasing operation sleep, when the other thread is in wait queue. -- 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

Re: [PATCH 2/3] Add shrink_pagecache_parent

2014-01-07 Thread Li Wang
Hi, On 01/03/2014 07:55 AM, Andrew Morton wrote: On Mon, 30 Dec 2013 21:45:17 +0800 Li Wang wrote: Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Please cc Dave Chinner on future

Re: [PATCH 2/3] Add shrink_pagecache_parent

2014-01-07 Thread Li Wang
Hi, On 01/03/2014 07:55 AM, Andrew Morton wrote: On Mon, 30 Dec 2013 21:45:17 +0800 Li Wang liw...@ubuntukylin.com wrote: Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Please cc

Re: [PATCH 0/3] Fadvise: Directory level page cache cleaning support

2014-01-02 Thread Li Wang
Do we really need clean dcache/icache at the current stage? That will introduce more code work, so far, iput() will put those unreferenced inodes into superblock lru list. To free the inodes inside a specific directory, it seems we do not have a handy API to use, and need modify iput() to

Re: [PATCH 0/3] Fadvise: Directory level page cache cleaning support

2014-01-02 Thread Li Wang
Do we really need clean dcache/icache at the current stage? That will introduce more code work, so far, iput() will put those unreferenced inodes into superblock lru list. To free the inodes inside a specific directory, it seems we do not have a handy API to use, and need modify iput() to

[PATCH 0/3] Fadvise: Directory level page cache cleaning support

2013-12-30 Thread Li Wang
evicted (due to LRU). When re-accessing '1', some entries need be reloaded from disk, which is time-consuming. In this case, cleaning '2' before 'cp -r 3 4' enjoys a good speedup. Li Wang (3): VFS: Add the declaration of shrink_pagecache_parent Add shrink_pagecache_parent Fadvise: Add the ability

[PATCH 3/3] Fadvise: Add the ability for directory level page cache cleaning

2013-12-30 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- mm/fadvise.c |4 1 file changed, 4 insertions(+) diff --git a/mm/fadvise.c b/mm/fadvise.c index 3bcfd81..644d32d 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -113,6 +113,10 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t

[PATCH 1/3] VFS: Add the declaration of shrink_pagecache_parent

2013-12-30 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- include/linux/dcache.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bf72e9a..6262171 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -249,6 +249,7

[PATCH 2/3] Add shrink_pagecache_parent

2013-12-30 Thread Li Wang
Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- fs/dcache.c | 36 1 file changed, 36

[PATCH 2/3] Add shrink_pagecache_parent

2013-12-30 Thread Li Wang
Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- fs/dcache.c | 36

[PATCH 3/3] Fadvise: Add the ability for directory level page cache cleaning

2013-12-30 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- mm/fadvise.c |4 1 file changed, 4 insertions(+) diff --git a/mm/fadvise.c b/mm/fadvise.c index 3bcfd81..644d32d 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -113,6 +113,10

[PATCH 1/3] VFS: Add the declaration of shrink_pagecache_parent

2013-12-30 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- include/linux/dcache.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bf72e9a..6262171 100644 --- a/include/linux/dcache.h +++ b

[PATCH 0/3] Fadvise: Directory level page cache cleaning support

2013-12-30 Thread Li Wang
', some entries need be reloaded from disk, which is time-consuming. In this case, cleaning '2' before 'cp -r 3 4' enjoys a good speedup. Li Wang (3): VFS: Add the declaration of shrink_pagecache_parent Add shrink_pagecache_parent Fadvise: Add the ability for directory level page cache

Re: [PATCH 0/3] Ceph fscache: Fix kernel panic due to a race

2013-12-27 Thread Li Wang
ceph find that the page does not be cached in fscache, then it decides to write this page into fscache, during this process in cachefiles_write_page(), it found that object->store_limit_l < 4096 (page->index << 12), it causes panic. Does it make sense? Cheers, Li Wang On 2013/12/27 6:51,

Re: [PATCH 0/3] Ceph fscache: Fix kernel panic due to a race

2013-12-27 Thread Li Wang
does not be cached in fscache, then it decides to write this page into fscache, during this process in cachefiles_write_page(), it found that object-store_limit_l 4096 (page-index 12), it causes panic. Does it make sense? Cheers, Li Wang On 2013/12/27 6:51, Milosz Tanski wrote: Li, I looked

[PATCH 1/3] Ceph fscache: Add an interface to synchronize object store limit

2013-12-26 Thread Li Wang
From: Yunchuan Wen Add an interface to explicitly synchronize object->store_limit[_l] with inode->i_size Signed-off-by: Yunchuan Wen Signed-off-by: Min Chen Signed-off-by: Li Wang --- fs/ceph/cache.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/ceph/cache.h b/f

[PATCH 2/3] Ceph fscache: Update object store limit after file writing

2013-12-26 Thread Li Wang
From: Yunchuan Wen Synchronize object->store_limit[_l] with new inode->i_size after file writing. Signed-off-by: Yunchuan Wen Signed-off-by: Min Chen Signed-off-by: Li Wang --- fs/ceph/file.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/file.c b/fs/ceph/file.c

[PATCH 0/3] Ceph fscache: Fix kernel panic due to a race

2013-12-26 Thread Li Wang
From: Yunchuan Wen The following scripts could easily panic the kernel, #!/bin/bash mount -t ceph -o fsc MONADDR:/ cephfs rm -rf cephfs/foo dd if=/dev/zero of=cephfs/foo bs=8 count=512 echo 3 > /proc/sys/vm/drop_caches dd if=cephfs/foo of=/dev/null bs=8 count=1024 This is due to when writing a

[PATCH 3/3] Ceph fscache: Wait for completion of object initialization

2013-12-26 Thread Li Wang
, the initialization may have not completed, the code will reach the ASSERT in fscache_submit_exclusive_op() to cause kernel bug. Signed-off-by: Yunchuan Wen Signed-off-by: Min Chen Signed-off-by: Li Wang --- fs/ceph/cache.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/cache.c

[PATCH 3/3] Ceph fscache: Wait for completion of object initialization

2013-12-26 Thread Li Wang
, then immediately followed by a writing, the initialization may have not completed, the code will reach the ASSERT in fscache_submit_exclusive_op() to cause kernel bug. Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com Signed-off-by: Min Chen minc...@ubuntukylin.com Signed-off-by: Li Wang liw

[PATCH 0/3] Ceph fscache: Fix kernel panic due to a race

2013-12-26 Thread Li Wang
From: Yunchuan Wen yunchuan...@ubuntukylin.com The following scripts could easily panic the kernel, #!/bin/bash mount -t ceph -o fsc MONADDR:/ cephfs rm -rf cephfs/foo dd if=/dev/zero of=cephfs/foo bs=8 count=512 echo 3 /proc/sys/vm/drop_caches dd if=cephfs/foo of=/dev/null bs=8 count=1024

[PATCH 2/3] Ceph fscache: Update object store limit after file writing

2013-12-26 Thread Li Wang
From: Yunchuan Wen yunchuan...@ubuntukylin.com Synchronize object-store_limit[_l] with new inode-i_size after file writing. Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com Signed-off-by: Min Chen minc...@ubuntukylin.com Signed-off-by: Li Wang liw...@ubuntukylin.com --- fs/ceph/file.c

[PATCH 1/3] Ceph fscache: Add an interface to synchronize object store limit

2013-12-26 Thread Li Wang
From: Yunchuan Wen yunchuan...@ubuntukylin.com Add an interface to explicitly synchronize object-store_limit[_l] with inode-i_size Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com Signed-off-by: Min Chen minc...@ubuntukylin.com Signed-off-by: Li Wang liw...@ubuntukylin.com --- fs/ceph

[PATCH 1/2] ceph fscache: Introduce a routine for uncaching single no data page from fscache

2013-12-19 Thread Li Wang
Signed-off-by: Li Wang --- fs/ceph/cache.h | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index ba94940..da95f61 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph/cache.h @@ -67,6 +67,14 @@ static inline int ceph_release_fscache_page(struct page

[PATCH 0/2] ceph fscache: uncaching single no data page when error

2013-12-19 Thread Li Wang
Currently, if one new page allocated into fscache in readpage(), however, with no data read into due to error encountered during reading from OSDs, the slot in fscache is not uncached. This patch fixes this. Li Wang (2): ceph: Introduce a routine for uncaching single no data page from

[PATCH 2/2] ceph fscache: Uncaching no data page from fscache in readpage()

2013-12-19 Thread Li Wang
Currently, if one new page allocated into fscache in readpage(), however, with no data read into due to error encountered during reading from OSDs, the slot in fscache is not uncached. This patch fixes this. Signed-off-by: Li Wang --- fs/ceph/addr.c |1 + 1 file changed, 1 insertion

[PATCH 2/2] ceph fscache: Uncaching no data page from fscache in readpage()

2013-12-19 Thread Li Wang
Currently, if one new page allocated into fscache in readpage(), however, with no data read into due to error encountered during reading from OSDs, the slot in fscache is not uncached. This patch fixes this. Signed-off-by: Li Wang liw...@ubuntukylin.com --- fs/ceph/addr.c |1 + 1 file

[PATCH 1/2] ceph fscache: Introduce a routine for uncaching single no data page from fscache

2013-12-19 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com --- fs/ceph/cache.h | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index ba94940..da95f61 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph/cache.h @@ -67,6 +67,14 @@ static inline int

[PATCH 0/2] ceph fscache: uncaching single no data page when error

2013-12-19 Thread Li Wang
Currently, if one new page allocated into fscache in readpage(), however, with no data read into due to error encountered during reading from OSDs, the slot in fscache is not uncached. This patch fixes this. Li Wang (2): ceph: Introduce a routine for uncaching single no data page from

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Wang
' could handle directory level page cache cleaning. On 2013/12/18 6:05, Dave Chinner wrote: On Mon, Dec 16, 2013 at 07:00:04AM -0800, Li Wang wrote: Currently, Linux only support file system wide VFS cache (dentry cache and page cache) cleaning through '/proc/sys/vm/drop_caches'. Sometimes

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Wang
This extension is just add-on extension. The original debugging capability is still there, and more flexible debugging is now allowed. On 2013/12/17 17:12, Li Zefan wrote: On 2013/12/17 15:23, Li Wang wrote: If we do wanna equip fadvise() with directory level page cache cleaning, this could

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Wang
This extension is just add-on extension. The original debugging capability is still there, and more flexible debugging is now allowed. On 2013/12/17 17:12, Li Zefan wrote: On 2013/12/17 15:23, Li Wang wrote: If we do wanna equip fadvise() with directory level page cache cleaning, this could

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Wang
' could handle directory level page cache cleaning. On 2013/12/18 6:05, Dave Chinner wrote: On Mon, Dec 16, 2013 at 07:00:04AM -0800, Li Wang wrote: Currently, Linux only support file system wide VFS cache (dentry cache and page cache) cleaning through '/proc/sys/vm/drop_caches'. Sometimes

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
semantics keep unchanged, and with add-on features to do finer granularity cache cleaning should be also desirable. On 2013/12/17 11:58, Matthew Wilcox wrote: On Tue, Dec 17, 2013 at 11:08:16AM +0800, Li Wang wrote: As far as we know, fadvise(DONTNEED) does not support metadata cache cleaning. We

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
that directory? On 2013/12/17 1:45, Cong Wang wrote: On Mon, Dec 16, 2013 at 7:00 AM, Li Wang wrote: This patch extend the 'drop_caches' interface to support directory level cache cleaning and has a complete backward compatibility. '{1,2,3}' keeps the same semantics as before. Besides, "{

[PATCH 5/5] VFS: Extend drop_caches sysctl handler to allow directory level cache cleaning

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- fs/drop_caches.c | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 9fd702f..ab31393 100644 --- a/fs/drop_caches.c +++ b/fs

[PATCH 3/5] VFS: Add the declaration of shrink_pagecache_parent

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- include/linux/dcache.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 57e87e7..ce11098 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -247,6 +247,7

[PATCH 1/5] VFS: Convert drop_caches to accept string

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- kernel/sysctl.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 34a6047..2f2d8ab 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1255,12 +1255,10 @@ static struct

[PATCH 2/5] VFS: Convert sysctl_drop_caches to string

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- include/linux/mm.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1cedd00..5e3cc5b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -17,6 +17,7 @@ #include

[PATCH 4/5] VFS: Add shrink_pagecache_parent

2013-12-16 Thread Li Wang
Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- fs/dcache.c | 35 +++ 1 file changed, 35

[PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
up, a maximum 4.29X performance improvements is achieved. The advantage of directory level page cache cleaning should be easier to be demonstrated. Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen Li Wang (5): VFS: Convert drop_caches to accept string VFS: Convert sysctl_drop_caches to

[PATCH 4/5] VFS: Add shrink_pagecache_parent

2013-12-16 Thread Li Wang
Analogous to shrink_dcache_parent except that it collects inodes. It is not very appropriate to be put in dcache.c, but d_walk can only be invoked from here. Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- fs/dcache.c | 35

[PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
4.29X performance improvements is achieved. The advantage of directory level page cache cleaning should be easier to be demonstrated. Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com Li Wang (5): VFS: Convert drop_caches to accept string VFS

[PATCH 3/5] VFS: Add the declaration of shrink_pagecache_parent

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- include/linux/dcache.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 57e87e7..ce11098 100644 --- a/include/linux/dcache.h +++ b

[PATCH 1/5] VFS: Convert drop_caches to accept string

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- kernel/sysctl.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 34a6047..2f2d8ab 100644 --- a/kernel/sysctl.c +++ b

[PATCH 2/5] VFS: Convert sysctl_drop_caches to string

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- include/linux/mm.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1cedd00..5e3cc5b 100644 --- a/include/linux/mm.h

[PATCH 5/5] VFS: Extend drop_caches sysctl handler to allow directory level cache cleaning

2013-12-16 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- fs/drop_caches.c | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 9fd702f

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
that directory? On 2013/12/17 1:45, Cong Wang wrote: On Mon, Dec 16, 2013 at 7:00 AM, Li Wang liw...@ubuntukylin.com wrote: This patch extend the 'drop_caches' interface to support directory level cache cleaning and has a complete backward compatibility. '{1,2,3}' keeps the same semantics as before

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-16 Thread Li Wang
semantics keep unchanged, and with add-on features to do finer granularity cache cleaning should be also desirable. On 2013/12/17 11:58, Matthew Wilcox wrote: On Tue, Dec 17, 2013 at 11:08:16AM +0800, Li Wang wrote: As far as we know, fadvise(DONTNEED) does not support metadata cache cleaning. We

[PATCH 1/2] ceph: Clean up if error occurred in finish_read()

2013-11-27 Thread Li Wang
Clean up if error occurred rather than going through normal process Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- fs/ceph/addr.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1e561c0..97845b4 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph

[PATCH 0/2] ceph: Add clean up if invalid osd reply received

2013-11-27 Thread Li Wang
Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen Li Wang (2): ceph: Clean up if error occurred in finish_read() ceph: Add necessary clean up if invalid reply received in handle_reply() fs/ceph/addr.c|3 +++ net/ceph/osd_client.c |7 +++ 2 files changed, 10

[PATCH 2/2] ceph: Add necessary clean up if invalid reply received in handle_reply()

2013-11-27 Thread Li Wang
Wake up possible waiters, invoke the call back if any, unregister the request Signed-off-by: Li Wang Signed-off-by: Yunchuan Wen --- net/ceph/osd_client.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 2b4b32a..a17eaae 100644

[PATCH 2/2] ceph: Add necessary clean up if invalid reply received in handle_reply()

2013-11-27 Thread Li Wang
Wake up possible waiters, invoke the call back if any, unregister the request Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- net/ceph/osd_client.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/net/ceph/osd_client.c b/net

[PATCH 0/2] ceph: Add clean up if invalid osd reply received

2013-11-27 Thread Li Wang
Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com Li Wang (2): ceph: Clean up if error occurred in finish_read() ceph: Add necessary clean up if invalid reply received in handle_reply() fs/ceph/addr.c|3 +++ net/ceph

[PATCH 1/2] ceph: Clean up if error occurred in finish_read()

2013-11-27 Thread Li Wang
Clean up if error occurred rather than going through normal process Signed-off-by: Li Wang liw...@ubuntukylin.com Signed-off-by: Yunchuan Wen yunchuan...@ubuntukylin.com --- fs/ceph/addr.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1e561c0

Re: [PATCH] Ceph: Avoid data inconsistency due to d-cache aliasing in readpage()

2013-11-13 Thread Li Wang
Hi Yan, zero_user_segment() has invoked flush_dcache_page() for us, we donnot wanna flush d-cache twice. Cheers, Li Wang On 11/13/2013 09:19 PM, Yan, Zheng wrote: On Wed, Nov 13, 2013 at 3:22 PM, Li Wang wrote: If the length of data to be read in readpage() is exactly PAGE_CACHE_SIZE

Re: [PATCH] Ceph: Avoid data inconsistency due to d-cache aliasing in readpage()

2013-11-13 Thread Li Wang
Hi Yan, zero_user_segment() has invoked flush_dcache_page() for us, we donnot wanna flush d-cache twice. Cheers, Li Wang On 11/13/2013 09:19 PM, Yan, Zheng wrote: On Wed, Nov 13, 2013 at 3:22 PM, Li Wang liw...@ubuntukylin.com wrote: If the length of data to be read in readpage

[PATCH] Ceph: Avoid data inconsistency due to d-cache aliasing in readpage()

2013-11-12 Thread Li Wang
If the length of data to be read in readpage() is exactly PAGE_CACHE_SIZE, the original code does not flush d-cache for data consistency after finishing reading. This patches fixes this. Signed-off-by: Li Wang --- fs/ceph/addr.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[PATCH] Ceph: Avoid data inconsistency due to d-cache aliasing in readpage()

2013-11-12 Thread Li Wang
If the length of data to be read in readpage() is exactly PAGE_CACHE_SIZE, the original code does not flush d-cache for data consistency after finishing reading. This patches fixes this. Signed-off-by: Li Wang liw...@ubuntukylin.com --- fs/ceph/addr.c |8 ++-- 1 file changed, 6

[PATCH 7/7] Cifs: Uncaching no-data page in readpage()

2013-11-11 Thread Li Wang
Currently, if one page allocated into fscache in readpage(), however, with no-data read, it is not uncached. This patch fixes this. Signed-off-by: Li Wang --- fs/cifs/file.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 7f2

[PATCH 4/7] Ceph: Uncaching no-data page in readpage()

2013-11-11 Thread Li Wang
Currently, if one page allocated into fscache in readpage(), however, with no-data read, it is not uncached. This patch fixes this. Signed-off-by: Li Wang --- fs/ceph/addr.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 6df8bd4..be5f4b6 100644

[PATCH 3/7] Ceph: Introduce routine for uncaching single no-data page

2013-11-11 Thread Li Wang
Introduce a routine for uncaching single no-data page, typically in readpage(). Signed-off-by: Li Wang --- fs/ceph/cache.h | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index ba94940..eb0ec76 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph

[PATCH 6/7] Cifs: Implement uncaching single no-data page

2013-11-11 Thread Li Wang
Implement the routine for uncaching single no-data page, typically in readpage(). Signed-off-by: Li Wang --- fs/cifs/fscache.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c index 8d4b7bc..168f184 100644 --- a/fs/cifs/fscache.c +++ b/fs/cifs

[PATCH 1/7] Fscache: Introduce new API fscache_readpage_cancel()

2013-11-11 Thread Li Wang
Introduce a new API fscache_readpage_cancel() for uncaching one single no-data page from fscache. Signed-off-by: Li Wang --- include/linux/fscache.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/fscache.h b/include/linux/fscache.h index 115bb81..f1ed21f 100644

  1   2   >