System scheduling, signals, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working on some particularly complex kernel hacking thing and I
thought that I could use some input from more experienced guys and
thought that LKML might not be a best place to ask this, while
Kernelnewbies seems more appropriate, even thought I'm not entirely
newbie.

I'm dealing with a problem that my heavily modified system "hangs"
while the vanilla does not. My version works fine, but at some point
of booting process it stops.

When I'm debugging the issue I can clearly see that scheduler is
switching between swapper and kworker processes only, while other
processes are sleeping:

(gdb) ps
0xC09BFF10     0 Running            -          - (none) swapper
0xC786F280     1 Sleep(In.)         -          - (none) init
0xC786E960     2 Sleep(In.)         -          - (none) kthreadd
0xC786E040     3 Sleep(In.)         -          - (none) ksoftirqd/0
0xC78792A0     4 Running            -          - (none) kworker/0:0
0xC7878980     5 Sleep(In.)         -          - (none) kworker/u:0
0xC7878060     6 Sleep(In.)         -          - (none) cpuset
0xC78892C0     7 Sleep(In.)         -          - (none) khelper
0xC78889A0     8 Sleep(In.)         -          - (none) kworker/u:1
0xC7888080   277 Sleep(In.)         -          - (none) sync_supers
0xC789B2E0   279 Sleep(In.)         -          - (none) bdi-default
0xC78C1320   281 Sleep(In.)         -          - (none) kblockd
0xC78B1300   292 Sleep(In.)         -          - (none) ata_sff
0xC78C00E0   304 Sleep(Un.)         -          - (none) khubd
0xC78F1340   327 Sleep(In.)         -          - (none) kworker/0:1
0xC78F0A20   328 Sleep(In.)         -          - (none) cfg80211
0xC78F0100   411 Sleep(In.)         -          - (none) rpciod
0xC789A9C0   419 Sleep(In.)         -          - (none) khungtaskd
0xC78C0A00   420 Sleep(Un.)         -          - (none) kswapd0
0xC7927360   421 Sleep(In.)         -          - (none) fsnotify_mark
0xC78B00C0   422 Sleep(In.)         -          - (none) nfsiod
0xC7926A40   424 Sleep(In.)         -          - (none) crypto
0xC7A6CA80   523 Sleep(In.)         -          - (none) zd1211rw
0xC7926120   532 Sleep(In.)         -          - (none) libertastf
0xC7A64140   566 Sleep(In.)         -          - (none) kworker/0:2
0xC7A65380   573 Sleep(In.)         -          - (none) kpsmoused
0xC7A6D3A0   592 Sleep(In.)         -          - (none) kworker/u:2
0xC7A6C160   606 Sleep(In.)         -          - (none) mmcqd/0
0xC78B09E0   644 Sleep(In.)         -          - (none) jbd2/mmcblk0p2-
0xC7A9C1A0   645 Sleep(In.)         -          - (none) ext4-dio-unwrit
0xC7A64A60   647 Sleep(In.)         -          - (none) plymouthd
0xC789A0A0   649 Sleep(Un.)         -          - (none) plymouthd
0xC7A9D3E0   651 Sleep(Un.)         -          - (none) sh

This is the output of macro that I'm using.

(In.) == Interruptable; (Un.) == Uninterraptable


The problem is: I don't entirely understand all the details about
scheduling/task primitives and the problem can sit just anywhere: my
changes touch the bare bones of exception handling etc.

I wish to know:
- what data structures and fields should I check to see if there are
any pending signals
- what all the stuff in scheduling data?
- how would you approach such problem while being able to run two
versions (modified and vanilla) side by side
- what are critical functions in kernel code that are dealing with
waking and putting processes into sleep; I wish to break debbugger on
them or put some printk's here and there and look for some pattern


Can you throw some ideas or links/books to read?

Much appreciated.

Best Regards,

-- 
Dawid Ciężarkiewicz

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux