Re: [BUG]Writeback Cgroup/Dirty Throttle: very small buffered write thoughput caused by writeback cgroup and dirty thottle

2016-05-12 Thread Miao Xie
on 2016/5/12 at 23:32, Tejun Heo wrote: On Thu, May 12, 2016 at 09:11:33AM +0800, Miao Xie wrote: My box has 48 cores and 188GB memory, but I set vm.dirty_background_bytes = 268435456 vm.dirty_bytes = 536870912 if I set vm.dirty_background_bytes and vm.dirty_bytes to be a large number

Re: [BUG]Writeback Cgroup/Dirty Throttle: very small buffered write thoughput caused by writeback cgroup and dirty thottle

2016-05-11 Thread Miao Xie
Cc linux-kernel mail list on 2016/5/11 at 22:15, Miao Xie wrote: Hi, Tejun and Fengguang I found that buffered write thoughput was dropped down by writeback cgroup and dirty thottle on 4.6-rc7 kernel. If I ran benchmark on the top block cgroup, the thoughput was more than 1500MB/s. If I ran

Re: [btrfs] 8d875f95: xfstests.generic.226.fail

2014-08-20 Thread Miao Xie
On Tue, 19 Aug 2014 10:58:09 -0400, Chris Mason wrote: > On 08/19/2014 10:23 AM, David Sterba wrote: >> On Tue, Aug 19, 2014 at 07:58:20PM +0800, Fengguang Wu wrote: >>> We noticed an xfstests failure on commit >>> >>> 8d875f95da43c6a8f18f77869f2ef26e9594fecc ("btrfs: disable strict file >>> flush

Re: [PATCH] Btrfs: Refactor btrfs_lock_cluster() to kill compiler warning

2014-06-23 Thread Miao Xie
; by standard C "while (1) { ... }", > - Move block not processed during the first iteration of the loop to the > end of the loop, which allows to kill the "locked" variable, > > Signed-off-by: Geert Uytterhoeven Looks good to me. Reviewed-and-Tested-by: Miao Xie >

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-03 Thread Miao Xie
On thu, 27 Feb 2014 21:44:23 +0900, Yasuaki Ishimatsu wrote: > When doing aio ring page migration, we migrated the page, and update > ctx->ring_pages[]. Like the following: > > aio_migratepage() > |-> migrate_page_copy(new, old) > | .. /* Need barrier here */

Re: [PATCH] aio: optimize free kioctx slot search

2013-12-26 Thread Miao Xie
> start > from 'next_free' to reduce the search and improve the performance. > > Signed-off-by: Gu Zheng Reviewed-by: Miao Xie Thanks Miao > --- > fs/aio.c | 10 -- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/fs/aio.c

[PATCH] ftrace: initialize the ftrace profile for each possible cpu

2013-12-15 Thread Miao Xie
ion_profile_enabled # echo 1 > function_profile_enabled # cat trace_stat/function* # run test # cat trace_stat/function* So it is better that initialize the ftrace profile for each possible cpu every time we enable the function profile, not only for each online cpu. Signed-off-by: Miao Xie --- kernel/trace/f

Re: readahead: make context readahead more conservative

2013-08-18 Thread Miao Xie
here is ~5% regression(10.65MB/s -> 10.09MB/s), for ext4, the performance grows up a bit.(9.98MB/s -> 10.04MB/s). (I run the test for 4 times, and the above result is the average of the test.) Any comment? Thanks Miao > > Tested-by: Tao Ma > Tested-by: Miao Xie > Signed-o

Re: [PATCH] btrfs: use list_for_each_entry_safe() when delete items

2013-07-29 Thread Miao Xie
e is "kfree(device);" at the end of loop, maybe there must "goto > again;" after it? > (instead of this patch) Your fix is right, we needn't search from the head once again. The other fix way is: call_rcu(&device->rcu, free_device); +

Re: [PATCH] btrfs: raid56: avoid double allocation

2013-07-25 Thread Miao Xie
On thu, 25 Jul 2013 16:18:41 +0800, Liu Bo wrote: > On Thu, Jul 25, 2013 at 02:09:40AM +0200, Andi Shyti wrote: >> alloc_rbio frees already bbio and raid_map, therefore they don't >> need to be freed in case it fails >> > > Looks good to me. > > Reviewed-by: Liu Bo Dan Carpenter has fixed

Re: [PATCH] Btrfs: do not ignore errors when truncating the free space cache inode

2013-06-18 Thread Miao Xie
It was fixed by Wei Yongjun http://marc.info/?l=linux-btrfs&m=136910396606489&w=2 Thanks Miao On tue, 18 Jun 2013 22:57:41 +0100, Djalal Harouni wrote: > btrfs_check_trunc_cache_free_space() tries to check if there is enough > space for cache inode truncation but it fails. > > Currently this fu

Re: [PATCH] btrfs: Drop inode if inode root is NULL

2013-06-06 Thread Miao Xie
; root->root_item. > > Signed-off-by: Naohiro Aota Reviewed-by: Miao Xie > --- > fs/btrfs/inode.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index af978f7..17f3064 100644 > --- a/fs/btrfs/inode.c >

Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-18 Thread Miao Xie
On tue, 19 Feb 2013 09:22:40 +0800, Li Zefan wrote: > There's a long long-standing bug...As long as I don't know when it dates > from. > > I've written and attached a simple program to reproduce this bug, and it can > immediately trigger the bug in my box. It uses two threads, one keeps calling >

Re: [PATCH V2] mm/slab: add a leak decoder callback

2013-01-15 Thread Miao Xie
On wed, 16 Jan 2013 11:03:13 +0800, Liu Bo wrote: > This adds a leak decoder callback so that slab destruction > can use to generate debugging output for the allocated objects. > > Callers like btrfs are using their own leak tracking which will > manage allocated objects in a list(or something els

[PATCH V2] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them

2013-01-09 Thread Miao Xie
nt a new writeback_inodes_sb(_nr)_if_idle(). The name of these two functions is cumbersome, so rename them to try_to_writeback_inodes_sb(_nr). This idea came from Christoph Hellwig. Some code is from the patch of Kamal Mostafa. Signed-off-by: Miao Xie --- Changelog v1 -> v2: - do not remove EXPOR

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-23 Thread Miao Xie
On tue, 23 Oct 2012 12:20:08 +0200, Borislav Petkov wrote: > On Tue, Oct 23, 2012 at 06:17:31PM +0800, Miao Xie wrote: >> This function is called after a cpu is offline, in other words, it is >> impossible that the cpu is still in cpu_online_mask. otherwise there >> is someth

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-23 Thread Miao Xie
On tue, 23 Oct 2012 11:52:34 +0200, Borislav Petkov wrote: > On Tue, Oct 23, 2012 at 10:55:13AM +0800, Tang Chen wrote: >> So, how about warn once, and continue: >> if (cpu == dying) { >> WARN_ON_ONCE(cpu == dying); >> continue; >> } >> >> or, use BUG_ON() instea

[PATCH 1/2 RESEND] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them

2012-08-28 Thread Miao Xie
ck_inodes_sb(_nr). This idea came from Christoph Hellwig. Some code is from the patch of Kamal Mostafa. Signed-off-by: Miao Xie --- Many users who use btrfs met the deadlock problem caused by writeback_inodes_sb(_nr)_if_idle(), so I send this patch again and hope it will be received as soo

[PATCH] time: add an offline-cpu check in add_timer_on()

2007-12-14 Thread Miao Xie
Hi everyone, I think we need a check in the function add_timer_on() to avoid adding a timer into the timer list of an offline cpu. This patch fixes this problem in add_timer_on(). Signed-off-by: Miao Xie <[EMAIL PROTECTED]> --- kernel/timer.c |1 + 1 files changed, 1 insertions

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Miao Xie
an error condition, so considering it a BUG condition is a good idea. Miao, can you please note that the code works fine with PAGE_SIZE return but it's likely to indicate truncated result or overflow in normal use cases as a comment on top of the BUG_ON()? Thanks. OK, I did it. Signed-off-by: Mia

Re: [PATCH] time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem

2007-11-10 Thread Miao Xie
on 2007-11-8 20:11 WANG Cong wrote: On Thu, Nov 08, 2007 at 07:47:41PM +0800, WANG Cong wrote: Yes, snprintf is safer than sprintf. But here, the 'count' will be mis-pointed when snprintf returns no less than PAGE_SIZE (what you called overflow). So you may also need: if (unlikely(count

[PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-08 Thread Miao Xie
urred. This patch fixes an off-by-one error in fill_read_buffer. Signed-off-by: Miao Xie <[EMAIL PROTECTED]> --- fs/sysfs/file.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 27d1785..f98d66d 100644 --- a/fs/sysfs/file.c +++

[PATCH] time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem

2007-11-08 Thread Miao Xie
on't exceed PAGE_SIZE. I fix the bug by using snprintf according to the specification of the kernel (Version:2.6.24-rc2,File:Documentation/filesystems/sysfs.txt) Fix sysfs_show_available_clocksources() and sysfs_show_current_clocksources() buffer overflow problem with snprintf(). Signed-off-

[PATCH] timer:Remove clockevents_unregister_notifier

2007-08-08 Thread Miao Xie
Hi everyone, I find a function(clockevents_unregister_notifier) which is not called by anything in tree. Signed-off-by: Miao Xie <[EMAIL PROTECTED]> diff -urN linux-2.6.23-rc2.orig/kernel/time/clockevents.c linux-2.6.23-rc2/kernel/time/clockevents.c --- linux-2.6.23-rc2.orig/kerne