[PATCH] latency-profiling

Roger Larsson (roger.larsson@skelleftea.mail.telia.com)
Thu, 20 Sep 2001 08:05:07 +0200


--------------Boundary-00=_J86Y9OB0Q4XNQ2QRF17S
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi,

I ported my old latency-profiling patch to 2.4.10-pre10 with
the reschedulable kernel patch. (I have not checked that it is
preemption safe itself...)

This patch works a little different from Robert Loves.
Since it samples the execution location at ticks.
It is possible to instrument an ordinary kernel too...
These are the results (>5 ms):

Sep 19 20:09:28 jeloin kernel: Latency 17ms PID 316 %% ifconfig
Sep 19 20:09:28 jeloin kernel: Trace:
[mousedev:__insmod_mousedev_O/lib/modules/2.4.10-pre10/kernel/drivers+-93829/96]
[__rdtsc_delay+20/28]
Sep 19 20:12:48 jeloin kernel: Latency 10ms PID 870 %% artsd
Sep 19 20:12:48 jeloin kernel: Trace: [console_softint+230/232]
[__rdtsc_delay+20/28]
Sep 19 20:13:28 jeloin kernel: Latency 8ms PID 667 %% X
Sep 19 20:13:28 jeloin kernel: Trace: [__rdtsc_delay+22/28]
Sep 19 20:13:53 jeloin kernel: Latency 35ms PID 972 %% bash
Sep 19 20:13:53 jeloin kernel: Trace: [unmap_buffer+100/132]
[kmem_cache_free+140/148] [block_flushpage+43/112]
Sep 19 20:14:19 jeloin kernel: Latency 40ms PID 979 %% bash
Sep 19 20:14:19 jeloin kernel: Trace: [__refile_buffer+95/108]
[block_flushpage+43/112] [remove_inode_page+36/64] [__lru_cache_del+1/272]
Sep 19 20:15:55 jeloin kernel: Latency 21ms PID 1038 %% cp
Sep 19 20:15:55 jeloin kernel: Trace: [truncate_list_pages+200/456]
[try_to_free_buffers+332/556]
Sep 19 20:32:18 jeloin kernel: Latency 6ms PID 7 %% kupdated
Sep 19 20:32:19 jeloin kernel: Latency 5ms PID 1214 %% mmap002
Sep 19 20:35:18 jeloin kernel: Latency 22ms PID 1214 %% mmap002
Sep 19 20:35:18 jeloin kernel: Trace: [zap_page_range+318/628]
[zap_page_range+382/628]
Sep 19 21:49:22 jeloin kernel: Latency 10ms PID 0 %% swapper
Sep 19 21:49:22 jeloin kernel: Trace: [schedule+463/1032]
Sep 19 22:37:45 jeloin kernel: Latency 5ms PID 2439 %% y2bignfat
Sep 19 22:37:45 jeloin kernel: Latency 5ms PID 2446 %% y2bignfat
Sep 19 22:46:18 jeloin kernel: Latency 5ms PID 2552 %% y2bignfat
Sep 19 22:46:18 jeloin kernel: Trace: [zap_page_range+382/628]
Sep 19 22:46:18 jeloin kernel: Latency 5ms PID 2555 %% y2bignfat
Sep 19 22:46:18 jeloin kernel: Trace: [zap_page_range+318/628]
Sep 19 22:46:18 jeloin kernel: Latency 5ms PID 2559 %% y2bignfat
Sep 19 22:46:18 jeloin kernel: Latency 5ms PID 2571 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2573 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2574 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2578 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2579 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Trace: [zap_page_range+382/628]
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2593 %% y2bignfat
Sep 19 22:46:19 jeloin kernel: Trace: [zap_page_range+318/628]
Sep 19 22:46:19 jeloin kernel: Latency 5ms PID 2594 %% y2bignfat
Sep 19 22:46:20 jeloin kernel: Latency 5ms PID 2596 %% y2bignfat
Sep 20 07:27:57 jeloin kernel: Latency 59ms PID 281 %% cardmgr
Sep 20 07:27:57 jeloin kernel: Trace: [__rdtsc_delay+20/28]
[__rdtsc_delay+20/28] [__rdtsc_delay+22/28] [__rdtsc_delay+20/28]
[__rdtsc_delay+20/28]
Sep 20 07:27:57 jeloin kernel: Trace: [__rdtsc_delay+20/28]
Sep 20 07:27:57 jeloin kernel: Latency 24ms PID 316 %% ifconfig
Sep 20 07:27:57 jeloin kernel: Trace: [__rdtsc_delay+20/28]
[mousedev:__insmod_mousedev_O/lib/modules/2.4.10-pre10/kernel/drivers+-93829/96]
[mousedev:__insmod_mousedev_O/lib/modules/2.4.10-pre10/kernel/drivers+-93562/96]
Sep 20 07:27:59 jeloin kernel: Latency 8ms PID 649 %% X
Sep 20 07:27:59 jeloin kernel: Trace: [aux_write_ack+54/60]

-- 
Roger Larsson
Skellefteċ
Sweden

--------------Boundary-00=_J86Y9OB0Q4XNQ2QRF17S Content-Type: application/x-gzip; name="latency-profiling-2.4.10-pre10-preempt-r16.patch.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="latency-profiling-2.4.10-pre10-preempt-r16.patch.gz"

H4sICLqBqTsAA2xhdGVuY3ktcHJvZmlsaW5nLTIuNC4xMC1wcmUxMC1wcmVlbXB0LXIxNi5wYXRj aAClWHtX4koS/xs+Rems9wTDIwFFxNF1rrIju4reEe/u3JnZnDY0kIGkM51EZe/63beqO0HCw+Oc VU8C3fWuX1V1u7v75p/iDYvdMYSSh0zyAdzP2iDFiMvqlMkoEsFpIKRkQTXgcbHHfA5iCENvyttQ Gwuf1xRxLSQpPKpNWcwDd1YJpUAiLxhV6tW9qm3hAsentJv3VUVbLFYqFUCK5Kk24TLg09oVm3CS XBXSGxWuRAC3PAT7AOr1duOg3diDumXZRdM01/MV+gnXLC1i2dtvEy+xnJ5Cxd4rH4CpnqenRRD3 3yszoJ9jiND0QVXAwGf4HAo5wRd/4q4zED7zAvwWssBz6S29IKbtr0UoELcvBgmZjPRejC8v9nwM Hn4IhgJf9BVfkRjGnvyBnySPRCJdviAjmkVuPMUF5rokw2Uhu8foxTPSGEumqDPBSaReX4sVzeyN AkbMKAWfEzSIRIgg5k8orGi+hQpW8oacoKP0F+Psuve37kfnrntuN0tgHkPiDewmUeT2r67P7y47 t4piEs18VLSa5FVFrs73UvIabau1Id9rRBT+idBV3If4127Y7b3WS+qtsoWZLzdV5s13XuBOkwGH 91oqBmHojarjk9Ut31+77AW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NVVTbQRWBLnyQHhuOwaThmjqN7+8uyx5p7 uFr8HzGxyZ55FQAA

--------------Boundary-00=_J86Y9OB0Q4XNQ2QRF17S-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/