tech-kern archive

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

Re: sysctl_doeproc() race



On 13.03.2018 13:26, Robert Elz wrote:
> Sure - I was not suggesting that anything shouild be done to this code to
> make it run faster - I had seen that "could just use ..." comment ages ago,
> and (as I assume its original author did, even more ages previously) that
> it just wasn't worth the effort for this interface - typically nothing is 
> going to care how fast it is.
> 

I will value correctness here over scaling, at least for now - until the
coverage with tests can make us more certain about any refactoring.

Regarding duplicates - TODO: wire_count++ on pages, and remove relocking
of proc_lock.. or perhaps get rid of proc_lock too... this would perhaps
make the trick like rwlock reflock obsolete too.

I've added basic tests in t_zombie. There is not much room to cover
behavior with zombies, more ideas for future: assert that we can collect
zombies in any order, assert that orphaned zombies are collected by
init(8) (with ktrace(2)?).

Thank you for your feedback! I've switched now to other bug - dbregs*
tests sometimes fail under qemu.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index