[PATCH V1] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
test,i found those situation can count 25% in our system. Using this patch, there is no this situation. Signed-off-by: Jianpeng Ma CC:Shaohua Li --- block/blk-core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index a33870b..3c95c4d

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
On 2012-10-16 15:48 Shaohua Li Wrote: >2012/10/16 Jianpeng Ma : >> On 2012-10-15 21:18 Shaohua Li Wrote: >>>2012/10/15 Shaohua Li : >>>> 2012/10/15 Jianpeng Ma : >>>>> My workload is a raid5 which had 16 disks. And used our filesystem to &

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
On 2012-10-15 21:18 Shaohua Li Wrote: >2012/10/15 Shaohua Li : >> 2012/10/15 Jianpeng Ma : >>> My workload is a raid5 which had 16 disks. And used our filesystem to >>> write using direct-io mode. >>> I used the blktrace to find those message: >>> &

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
On 2012-10-15 21:18 Shaohua Li s...@kernel.org Wrote: 2012/10/15 Shaohua Li s...@fusionio.com: 2012/10/15 Jianpeng Ma majianp...@gmail.com: My workload is a raid5 which had 16 disks. And used our filesystem to write using direct-io mode. I used the blktrace to find those message: 8,16 0

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
On 2012-10-16 15:48 Shaohua Li s...@kernel.org Wrote: 2012/10/16 Jianpeng Ma majianp...@gmail.com: On 2012-10-15 21:18 Shaohua Li s...@kernel.org Wrote: 2012/10/15 Shaohua Li s...@fusionio.com: 2012/10/15 Jianpeng Ma majianp...@gmail.com: My workload is a raid5 which had 16 disks. And used our

[PATCH V1] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-16 Thread Jianpeng Ma
found those situation can count 25% in our system. Using this patch, there is no this situation. Signed-off-by: Jianpeng Ma majianp...@gmail.com CC:Shaohua Li s...@kernel.org --- block/blk-core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-15 Thread Jianpeng Ma
On 2012-10-15 21:18 Shaohua Li Wrote: >2012/10/15 Shaohua Li : >> 2012/10/15 Jianpeng Ma : >>> My workload is a raid5 which had 16 disks. And used our filesystem to >>> write using direct-io mode. >>> I used the blktrace to find those message: >>> &

[PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-15 Thread Jianpeng Ma
e situation, it can count 25%. With the patch,i tested and not found situation like above. Signed-off-by: Jianpeng Ma --- block/blk-core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index a33870b..3c95c4d 100644 --- a/block/blk-c

About reuse address space when __init func removed

2012-10-15 Thread Jianpeng Ma
Hi all, Today, I found some kernel message about memeleaking.As follows: unreferenced object 0x8800b6e6b980 (size 64): comm "modprobe", pid 1137, jiffies 4294676166 (age 7326.499s) hex dump (first 32 bytes): 01 04 01 00 00 00 00 00 00 00 98 b5 00 88 ff ff

About reuse address space when __init func removed

2012-10-15 Thread Jianpeng Ma
Hi all, Today, I found some kernel message about memeleaking.As follows: unreferenced object 0x8800b6e6b980 (size 64): comm modprobe, pid 1137, jiffies 4294676166 (age 7326.499s) hex dump (first 32 bytes): 01 04 01 00 00 00 00 00 00 00 98 b5 00 88 ff ff 00

[PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-15 Thread Jianpeng Ma
%. With the patch,i tested and not found situation like above. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index a33870b..3c95c4d 100644 --- a/block/blk-core.c +++ b/block/blk

Re: Re: [PATCH] block: Add blk_rq_pos(rq) to sort rq when plushing plug-list.

2012-10-15 Thread Jianpeng Ma
On 2012-10-15 21:18 Shaohua Li s...@kernel.org Wrote: 2012/10/15 Shaohua Li s...@fusionio.com: 2012/10/15 Jianpeng Ma majianp...@gmail.com: My workload is a raid5 which had 16 disks. And used our filesystem to write using direct-io mode. I used the blktrace to find those message: 8,16 0

Re: [PATCH 0/3] Fix problems about handling bio to plug when bio merged failed.

2012-09-18 Thread Jianpeng Ma
On 2012-08-10 19:44 Jianpeng Ma Wrote: >There are some problems about handling bio which merge to plug failed. >Patch1 will avoid unnecessary plug should_sort test,although it's not a bug. >Patch2 correct a bug when handle more devices,it leak some devices to trace >plug-operation

Re: Re: Why blktrace didn't trace requests merge?

2012-09-18 Thread Jianpeng Ma
On 2012-09-18 13:49 Jens Axboe Wrote: >On 2012-09-18 02:30, Jianpeng Ma wrote: >> On 2012-09-18 02:27 Jens Axboe Wrote: >>> On 2012-09-17 19:55, Tejun Heo wrote: >>>> (cc'ing Jens) >>>> >>>> On Mon, Sep 17, 2012 at 09:22:28AM -0400, Steven

Re: Re: Why blktrace didn't trace requests merge?

2012-09-18 Thread Jianpeng Ma
On 2012-09-18 13:49 Jens Axboe ax...@kernel.dk Wrote: On 2012-09-18 02:30, Jianpeng Ma wrote: On 2012-09-18 02:27 Jens Axboe ax...@kernel.dk Wrote: On 2012-09-17 19:55, Tejun Heo wrote: (cc'ing Jens) On Mon, Sep 17, 2012 at 09:22:28AM -0400, Steven Rostedt wrote: On Mon, 2012-09-17 at 19:33

Re: [PATCH 0/3] Fix problems about handling bio to plug when bio merged failed.

2012-09-18 Thread Jianpeng Ma
On 2012-08-10 19:44 Jianpeng Ma majianp...@gmail.com Wrote: There are some problems about handling bio which merge to plug failed. Patch1 will avoid unnecessary plug should_sort test,although it's not a bug. Patch2 correct a bug when handle more devices,it leak some devices to trace plug

Re: Re: Why blktrace didn't trace requests merge?

2012-09-17 Thread Jianpeng Ma
On 2012-09-18 02:27 Jens Axboe Wrote: >On 2012-09-17 19:55, Tejun Heo wrote: >> (cc'ing Jens) >> >> On Mon, Sep 17, 2012 at 09:22:28AM -0400, Steven Rostedt wrote: >>> On Mon, 2012-09-17 at 19:33 +0800, Jianpeng Ma wrote: >>>> Hi all: >>>>

Why blktrace didn't trace requests merge?

2012-09-17 Thread Jianpeng Ma
Hi all: I used blktrace to trace some io.But i can't find requests merge. I searched the code and did't not find. Why? Thanks!

Why blktrace didn't trace requests merge?

2012-09-17 Thread Jianpeng Ma
Hi all: I used blktrace to trace some io.But i can't find requests merge. I searched the code and did't not find. Why? Thanks!

Re: Re: Why blktrace didn't trace requests merge?

2012-09-17 Thread Jianpeng Ma
On 2012-09-18 02:27 Jens Axboe ax...@kernel.dk Wrote: On 2012-09-17 19:55, Tejun Heo wrote: (cc'ing Jens) On Mon, Sep 17, 2012 at 09:22:28AM -0400, Steven Rostedt wrote: On Mon, 2012-09-17 at 19:33 +0800, Jianpeng Ma wrote: Hi all: I used blktrace to trace some io.But i can't find

Re: Re: [PATCH 2/3] block: Fix not tracing all device plug-operation.

2012-09-14 Thread Jianpeng Ma
On 2012-08-10 21:09 Jens Axboe Wrote: >On 08/10/2012 01:46 PM, Jianpeng Ma wrote: >> If process handled two or more devices,there will not be trace some >> devices plug-operation. >> >> Signed-off-by: Jianpeng Ma >> --- >> block/blk-core.c | 16

Re: Re: [PATCH 2/3] block: Fix not tracing all device plug-operation.

2012-09-14 Thread Jianpeng Ma
On 2012-08-10 21:09 Jens Axboe jax...@fusionio.com Wrote: On 08/10/2012 01:46 PM, Jianpeng Ma wrote: If process handled two or more devices,there will not be trace some devices plug-operation. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c | 16 +++- 1

Re: Re: About function __create_file in debugfs

2012-09-10 Thread Jianpeng Ma
On 2012-09-08 23:25 gregkh Wrote: >On Sat, Sep 08, 2012 at 05:41:05PM +0800, Jianpeng Ma wrote: >> Hi: >> At present,i used blktrace to trace block io.But i always met error, >> the message like: >> >BLKTRACESETUP(2) /dev/sdc failed: 2/No such file or directory

Re: Re: About function __create_file in debugfs

2012-09-10 Thread Jianpeng Ma
On 2012-09-08 23:25 gregkh gre...@linuxfoundation.org Wrote: On Sat, Sep 08, 2012 at 05:41:05PM +0800, Jianpeng Ma wrote: Hi: At present,i used blktrace to trace block io.But i always met error, the message like: BLKTRACESETUP(2) /dev/sdc failed: 2/No such file or directory Thread 0

About function __create_file in debugfs

2012-09-08 Thread Jianpeng Ma
Hi: At present,i used blktrace to trace block io.But i always met error, the message like: >BLKTRACESETUP(2) /dev/sdc failed: 2/No such file or directory >Thread 0 failed open /sys/kernel/debug/block/(null)/trace0: 2/No such file or >directory >Thread 2 failed open

About function __create_file in debugfs

2012-09-08 Thread Jianpeng Ma
Hi: At present,i used blktrace to trace block io.But i always met error, the message like: BLKTRACESETUP(2) /dev/sdc failed: 2/No such file or directory Thread 0 failed open /sys/kernel/debug/block/(null)/trace0: 2/No such file or directory Thread 2 failed open

About multiple queries to control using $DBGMT/dynamic_debug/control

2012-08-22 Thread Jianpeng Ma
Hi, I used the $DBGMT/dynamic_debug/control to control printing debuginfo.But When i wote multiple queries which has at least one didn't match, the result is ok which no error can return. So i think i wrote correct queries.But until using dmesg, i only found error. And if

About multiple queries to control using $DBGMT/dynamic_debug/control

2012-08-22 Thread Jianpeng Ma
Hi, I used the $DBGMT/dynamic_debug/control to control printing debuginfo.But When i wote multiple queries which has at least one didn't match, the result is ok which no error can return. So i think i wrote correct queries.But until using dmesg, i only found error. And if

Re: Re: [PATCH] block: Don't use static to define "void *p" in show_partition_start().

2012-08-12 Thread Jianpeng Ma
On 2012-08-12 23:45 Michael Tokarev Wrote: >On 03.08.2012 12:41, Jens Axboe wrote: >> On 08/03/2012 07:07 AM, majianpeng wrote: >[] >>> diff --git a/block/genhd.c b/block/genhd.c >>> index cac7366..d839723 100644 >>> --- a/block/genhd.c >>> +++ b/block/genhd.c >>> @@ -835,7 +835,7 @@ static void

Re: Re: [PATCH] block: Don't use static to define void *p in show_partition_start().

2012-08-12 Thread Jianpeng Ma
On 2012-08-12 23:45 Michael Tokarev m...@tls.msk.ru Wrote: On 03.08.2012 12:41, Jens Axboe wrote: On 08/03/2012 07:07 AM, majianpeng wrote: [] diff --git a/block/genhd.c b/block/genhd.c index cac7366..d839723 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -835,7 +835,7 @@ static void

[PATCH 2/3 V1] block: Fix not tracing all device plug-operation.

2012-08-10 Thread Jianpeng Ma
If process handled two or more devices,there will not be trace some devices plug-operation. V0-->V1 Fix a bug when insert a req to plug-list which already had the same request-queue, it should used list_add not list_add_tail. Signed-off-by: Jianpeng Ma Signed-off-by: Jens Axboe --- block/

[RFC PATCH] fs/direct-io.c: Add REQ_NOIDLE for last bio .

2012-08-10 Thread Jianpeng Ma
For last bio of dio, there are no bio will come.So set REQ_NOIDLE. Signed-off-by: Jianpeng Ma --- fs/direct-io.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 1faf4cb..7c6958f 100644 --- a/fs/direct-io.c +++ b/fs

[PATCH 3/3] block: Remove unnecessary requests sort.

2012-08-10 Thread Jianpeng Ma
When adding request to plug,it already sort.So there is not unnecessary. Signed-off-by: Jianpeng Ma --- block/blk-core.c | 12 1 file changed, 12 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 034f186..9dbdef6 100644 --- a/block/blk-core.c +++ b/block/blk

[PATCH 2/3] block: Fix not tracing all device plug-operation.

2012-08-10 Thread Jianpeng Ma
If process handled two or more devices,there will not be trace some devices plug-operation. Signed-off-by: Jianpeng Ma --- block/blk-core.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 7a3abc6..034f186 100644

[PATCH 1/3] block: avoid unnecessary plug should_sort test.

2012-08-10 Thread Jianpeng Ma
If request_count >= BLK_MAX_REQUEST_COUNT,then it will exec blk_flush_plug_list which plug all request.So no need to do plug->should_sort test. Signed-off-by: Jianpeng Ma --- block/blk-core.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/blk-co

[PATCH 0/3] Fix problems about handling bio to plug when bio merged failed.

2012-08-10 Thread Jianpeng Ma
flush plug.Although patch2 has O(n*n) complexity,it's more than list_sort which has O(nlog(n)) complexity.But the plug list is unlikely too long,so i think patch3 can accept. Jianpeng Ma (3): block: avoid unnecessary plug should_sort test. block: Fix not tracing all device plug-operation

[PATCH 0/3] Fix problems about handling bio to plug when bio merged failed.

2012-08-10 Thread Jianpeng Ma
flush plug.Although patch2 has O(n*n) complexity,it's more than list_sort which has O(nlog(n)) complexity.But the plug list is unlikely too long,so i think patch3 can accept. Jianpeng Ma (3): block: avoid unnecessary plug should_sort test. block: Fix not tracing all device plug-operation

[PATCH 1/3] block: avoid unnecessary plug should_sort test.

2012-08-10 Thread Jianpeng Ma
If request_count = BLK_MAX_REQUEST_COUNT,then it will exec blk_flush_plug_list which plug all request.So no need to do plug-should_sort test. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH 2/3] block: Fix not tracing all device plug-operation.

2012-08-10 Thread Jianpeng Ma
If process handled two or more devices,there will not be trace some devices plug-operation. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index

[PATCH 3/3] block: Remove unnecessary requests sort.

2012-08-10 Thread Jianpeng Ma
When adding request to plug,it already sort.So there is not unnecessary. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c | 12 1 file changed, 12 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 034f186..9dbdef6 100644 --- a/block/blk

[RFC PATCH] fs/direct-io.c: Add REQ_NOIDLE for last bio .

2012-08-10 Thread Jianpeng Ma
For last bio of dio, there are no bio will come.So set REQ_NOIDLE. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- fs/direct-io.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 1faf4cb..7c6958f 100644 --- a/fs

[PATCH 2/3 V1] block: Fix not tracing all device plug-operation.

2012-08-10 Thread Jianpeng Ma
If process handled two or more devices,there will not be trace some devices plug-operation. V0--V1 Fix a bug when insert a req to plug-list which already had the same request-queue, it should used list_add not list_add_tail. Signed-off-by: Jianpeng Ma majianp...@gmail.com Signed-off-by: Jens

Re: Re: [RFC PATCH] block:Fix some problems about handling plug in blk_queue_bio().

2012-08-07 Thread Jianpeng Ma
On 2012-08-08 11:06 Shaohua Li Wrote: >2012/8/8 Jianpeng Ma : >> I think there are three problems about handling plug in blk_queue_bio(): >> 1:if request_count >= BLK_MAX_REQUEST_COUNT, avoid unnecessary >> plug->should_sort judge. >this makes sense, though not a bi

[RFC PATCH] block:Fix some problems about handling plug in blk_queue_bio().

2012-08-07 Thread Jianpeng Ma
d sort, it only O(n) complexity. Signed-off-by: Jianpeng Ma --- block/blk-core.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4b4dbdf..e7759f8 100644 --- a/block/blk-core.c +++ b/block/blk-

[RFC PATCH] block:Fix some problems about handling plug in blk_queue_bio().

2012-08-07 Thread Jianpeng Ma
, it only O(n) complexity. Signed-off-by: Jianpeng Ma majianp...@gmail.com --- block/blk-core.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4b4dbdf..e7759f8 100644 --- a/block/blk-core.c +++ b

Re: Re: [RFC PATCH] block:Fix some problems about handling plug in blk_queue_bio().

2012-08-07 Thread Jianpeng Ma
On 2012-08-08 11:06 Shaohua Li s...@kernel.org Wrote: 2012/8/8 Jianpeng Ma majianp...@gmail.com: I think there are three problems about handling plug in blk_queue_bio(): 1:if request_count = BLK_MAX_REQUEST_COUNT, avoid unnecessary plug-should_sort judge. this makes sense, though not a big