[pso] [tema3 linux]: bio_alloc
Florin Antonescu
florinantonescu at yahoo.com
Thu May 1 17:56:47 EEST 2008
contextul invalid era dat de __bio_kmap_atomic
----- Original Message ----
From: Razvan Deaconescu <razvand at cs.pub.ro>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Wednesday, April 30, 2008 11:13:36 PM
Subject: Re: [pso] [tema3 linux]: bio_alloc
On Wed, 2008-04-30 at 12:43 -0700, Florin Antonescu wrote:
> Ai lock pe un spinlock inainte de bio_alloc() ?
>
> Nu, trebuia sa am?
> Acestea sunt alte erori pe care le primesc. De la ce ar putea fi?
Da reply ca lumea. Nu se distinge replica ta de replica lui Andrei.
Dezactiveaza trimiterea de mesaje cu atasament HTML din Yahoo!
Recomandam GMail! :-P (Are POP3/IMAP)
Este frumos sa-ti semnezi mesajul pe care il trimiti.
> BUG: sleeping function called from invalid context at
Inca din primul mesaj ar fi trebuit sa ne trimiti tot stack trace-ul
oops-ului ca sa vedem cu ce avem de-a face.
> kernel/sched.c:3921
> in_atomic():1, irqs_disabled():0
> no locks held by bio_thread/2614.
> Pid: 2614, comm: bio_thread Not tainted 2.6.24.2 #14
> [<c0103d3a>] show_trace_log_lvl+0x1a/0x30
> [<c01046e2>] show_trace+0x12/0x20
> [<c0104a4c>] dump_stack+0x6c/0x80
> [<c0112bdf>] __might_sleep+0xcf/0xf0
> [<c0328592>] wait_for_common+0x22/0x110
> [<c03286e2>] wait_for_completion+0x12/0x20
> [<c012a729>] kthread_create+0x69/0xa0
> [<c884c609>] do_bio+0x279/0x384 [ssr]
> [<c012a582>] kthread+0x42/0x70
> [<c0103917>] kernel_thread_helper+0x7/0x10
<snip>
Din cate observ ai apelat functia kthread_create din cadrul functiei
do_bio (sau ma insel?)
Folosesti wait_for_completion pentru a astepta bio-ul (probabil dupa
sumbit_bio). Functia este insa blocanta si tu o apelezi intr-un context
non-blocant. Din ce reiese detii un spinlock.
Singurele posibilitati pe care le vad este ca obtii tu un spinlock si nu
il eliberezi sau I/O scheduler-ul foloseste spinlock-ul asociat cozii de
cereri. Desi, daca ai folosit corespunzator functia
blk_queue_make_request pentru crearea cozii, nu ar trebui sa ai
probleme. Personal, in implementarea mea nu am folosit nici un spinlock.
Razvan
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
pso mailing list
pso at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080501/9dcdcced/attachment.htm
More information about the pso
mailing list