2009-04-24 10:11:18

by Rutkov Denis

[permalink] [raw]
Subject: High kernel CPU usage when copying files

Dear linux kernel hackers, I need help hunting a very annoying bug.

I'm using Xubuntu 9.04 (kernel 2.6.28-11-42) on a [email protected] PC with 512MB RAM and two IDE drives (ext4).

Whenever I copy files I got very high CPU usage from kernel. I tested this with ext3, ext4 and fat32 file systems. To trace the problem I installed oprofile and debug kernel image. I ran the profiler during file copying and saw that there are many calls to copy_to_user_ll and copy_from_user_ll functions. So I have two questions:

1. Is this normal I get so many of those function calls?

2. What can I do to further trace this bug?


2009-04-24 10:22:56

by Alan

[permalink] [raw]
Subject: Re: High kernel CPU usage when copying files

> Whenever I copy files I got very high CPU usage from kernel. I tested this with ext3, ext4 and fat32 file systems. To trace the problem I installed oprofile and debug kernel image. I ran the profiler during file copying and saw that there are many calls to copy_to_user_ll and copy_from_user_ll functions. So I have two questions:
>
> 1. Is this normal I get so many of those function calls?

Yes

> 2. What can I do to further trace this bug?


Are you seeing high CPU usage or just a lot of D state processes (blocked
waiting I/O) ?

Alan

2009-04-24 14:18:33

by Heinz Diehl

[permalink] [raw]
Subject: Re: Re[2]: High kernel CPU usage when copying files

At Fri, 24 Apr 2009 14:30:03 +0400,
Rutkov Denis wrote:

> However, I can check this to be sure, just tell me how.

Do a "ps ax" on console and watch for processes which are flagged with a "D",
these are the uninterruptable processes ("D-state"). You can also use the
vmstat utility, the processes in blocked state show up in the second row on
the left side, titled with a small "b" on top.

2009-04-24 10:32:21

by Rutkov Denis

[permalink] [raw]
Subject: Re[2]: High kernel CPU usage when copying files

Thanks for replying.

> Are you seeing high CPU usage or just a lot of D state processes (blocked
waiting I/O) ?

Yes, I see high CPU usage, my whole system gets unresponsive. However, I can check this to be sure, just tell me how.