|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
SMP users needed to test patchHello everyone!
I'd like to mark mq*() syscall as MPSAFE, but before that I need someone to test them in an SMP capable machine running SMP kernel. I only have UP machines around. So, if anyone is able and kind enough, here are some directions on how to do it. I assume s\he is running HEAD. cd /usr/src fetch http://leaf.dragonflybsd.org/~beket/mq-mpsafe.diff git apply mq-mpsafe.diff make buildkernel make installkernel reboot git clone git://gitweb.dragonflybsd.org/~beket/pcca-tests.git cd pcca-tests/mqueue.h make && make -k run cd etc make sysctl -w kern.mqueue.mq_prio_max=200 ./t_mq_parallel_threads ./t_mq_parallel_fork If you encounter problems you can mail me off-list to sort them out. I know that it's messy, so no hard feelings if no one volunteers :) Thank you for considering. Best regards, Stathis Kamperis |
|
|
Re: SMP users needed to test patchHi,
On Wed, Nov 04, 2009 at 02:30:38PM +0200, Stathis Kamperis wrote: > git clone git://gitweb.dragonflybsd.org/~beket/pcca-tests.git > cd pcca-tests/mqueue.h > make && make -k run > cd etc > make > sysctl -w kern.mqueue.mq_prio_max=200 > ./t_mq_parallel_threads > ./t_mq_parallel_fork Are we suppose to perform the tests (make -k run and the last two lines) as root or a non-root user? I just tried that on vkernel, but if I run them as root, t_mq_open, t_mq_open_umask dump core, and any subsequent runs dump core too, no matter run as root or not. The version of pcca-tests is 0c458bb3cf5d4943093c9b05ca70cc298f09bb46. Cheers. |
|
|
Re: SMP users needed to test patch2009/11/5 YONETANI Tomokazu <qhwt+dfly@...>:
> Hi, Hi Yonetani & thank you for bothering! > On Wed, Nov 04, 2009 at 02:30:38PM +0200, Stathis Kamperis wrote: >> git clone git://gitweb.dragonflybsd.org/~beket/pcca-tests.git >> cd pcca-tests/mqueue.h >> make && make -k run >> cd etc >> make >> sysctl -w kern.mqueue.mq_prio_max=200 >> ./t_mq_parallel_threads >> ./t_mq_parallel_fork > > Are we suppose to perform the tests (make -k run and the last two lines) > as root or a non-root user? I just tried that on vkernel, but if I run (All the tests in the repository assume non-root runtime context. I should have mentioned that, sorry.) > them as root, t_mq_open, t_mq_open_umask dump core, and any subsequent > runs dump core too, no matter run as root or not. The version of That's "expected". When the tests failed for the first time (due to being ran as root) , the message queues remained in the system. So every subsequent attempt to run the tests again, failed because those queues were already present (opened) in the system. I will fix it by installing a signal handler that cleans up the mess upon SIGABRT. (Actually, IIRC, some tests may already have such a thing.) Most important is that vkernel didn't crash or hang :) I assume that you didn't pass -n1 to the vkernel, right ? > pcca-tests is 0c458bb3cf5d4943093c9b05ca70cc298f09bb46. > > Cheers. > Thanks again. Best regards, Stathis Kamperis |
|
|
Re: SMP users needed to test patchOn Thu, Nov 05, 2009 at 01:55:33AM +0200, Stathis Kamperis wrote:
> > Are we suppose to perform the tests (make -k run and the last two lines) > > as root or a non-root user? 〓I just tried that on vkernel, but if I run > As non-root. > (All the tests in the repository assume non-root runtime context. I > should have mentioned that, sorry.) > > > them as root, t_mq_open, t_mq_open_umask dump core, and any subsequent > > runs dump core too, no matter run as root or not. 〓The version of > That's "expected". > > When the tests failed for the first time (due to being ran as root) , > the message queues remained in the system. So every subsequent attempt > to run the tests again, failed because those queues were already > present (opened) in the system. I will fix it by installing a signal > handler that cleans up the mess upon SIGABRT. (Actually, IIRC, some > tests may already have such a thing.) OK, thanks for the explanation. > Most important is that vkernel didn't crash or hang :) > I assume that you didn't pass -n1 to the vkernel, right ? I used -n3 and -n16 but vkernel didn't crash or hang in either cases, so I tried it on the real kernel too, but so far all tests ran fine and I haven't managed to crash :). Oh, t_mq_send failed at line 56 after raising kern.mqueue.mq_prio_max to 200, but if I put it back to default (32), the test passes. Is it expected too? Cheers. |
|
|
Re: SMP users needed to test patch> Oh, t_mq_send failed at line 56 after raising kern.mqueue.mq_prio_max to 200,
> but if I put it back to default (32), the test passes. Is it expected too? Thanks for discovering a double defect :) First, my test case uses the MQ_PRIO_MAX constant (default 32) as defined in sys/mqueue.h to figure out the largest possible value for message queue priorities. This is wrong. It should get the value via sysconf() and _SC_MQ_PRIO_MAX. That said, when you set max priorities to 200, the test assumed that 32 was the largest possible value and that 2*32 would certainly be an invalid priority value. And it expected mq_send(..., 64); to fail, which it didn't since the real upper value for priorities was 200. When you restored the limit to its default value, 64 was a "legitimate invalid" value and the test passed. Second, we don't expose the real values for MQ_OPEN_MAX, MQ_PRIO_MAX and _POSIX_MESSAGE_PASSING. I'll fix both of them tomorrow. > > Cheers. > Thanks, for once more. Best regards, Stathis Kamperis |
|
|
Re: SMP users needed to test patch2009/11/5 Stathis Kamperis <ekamperi@...>:
> Second, we don't expose the real values for MQ_OPEN_MAX, MQ_PRIO_MAX > and _POSIX_MESSAGE_PASSING. In the sysconf() level that is. |
|
|
Re: SMP users needed to test patch2009/11/4 Stathis Kamperis <ekamperi@...>:
> Hello everyone! > > I'd like to mark mq*() syscall as MPSAFE, but before that I need > someone to test them in an SMP capable machine running SMP kernel. I > only have UP machines around. > > So, if anyone is able and kind enough, here are some directions on how > to do it. I assume s\he is running HEAD. > > cd /usr/src > fetch http://leaf.dragonflybsd.org/~beket/mq-mpsafe.diff > git apply mq-mpsafe.diff > make buildkernel > make installkernel > reboot > git clone git://gitweb.dragonflybsd.org/~beket/pcca-tests.git > cd pcca-tests/mqueue.h > make && make -k run > cd etc > make > sysctl -w kern.mqueue.mq_prio_max=200 > ./t_mq_parallel_threads > ./t_mq_parallel_fork Unfortunately, I forgot to mention one crucial step. After the patch application one should type 'make sysent' inside sys/kern, so that the syscall-related files be regenerated, namely the init_sysent.c. Or even better, *I* should have added the init_sysent.c changes in my patch. Since buildkernel doesn't regenerate these files automatically, I'm afraid that the tests ran with giant lock held upon syscall invocation. I apologize for wasting people`s time :( I'll just try to get physical access on an SMP cabable machine & run them on my own. Thank you both. Best regardis, Stathis Kamperis |
| Free embeddable forum powered by Nabble | Forum Help |