-current and rthreads

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

-current and rthreads

Maxim Belooussov
Hi all,

How to enable rthreads in -current?

Old way with RTHREADS kernel option and ln -s librthread doesn't work anymore.

Maxim

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Philip Guenther-2
On Fri, May 2, 2008 at 2:30 AM, Maxim Belooussov <[hidden email]> wrote:
>  How to enable rthreads in -current?
>
>  Old way with RTHREADS kernel option and ln -s librthread doesn't work anymore.

Are you trying to make it hard to help you?  Imprecise description of
what you did; *no* description of how the results differ from your
expectations.

"Doesn't work" means what?  It made your computer explode?  All
threaded programs hung?  Some threaded programs worked, other failed?
Nothing happened whatsoever?

Did you reboot with the new kernel?  ('uname' shows your config's
name, right?)  What *exactly* did you name the librthread symlink?
What version of OpenBSD were the threaded programs built against?


Philip Guenther

(I use rthreads myself for a few programs, though I had to patch a
number of bugs in the kernel support and librthread to make it stable
and there are still issues when used with several programs.  The patch
set I use can be found in the archives.)

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Maxim Belooussov
Hi,

>  >  How to enable rthreads in -current?
>  >
>  >  Old way with RTHREADS kernel option and ln -s librthread doesn't work anymore.
>
>  Are you trying to make it hard to help you?  Imprecise description of
>  what you did; *no* description of how the results differ from your
>  expectations.

My apologies for not providing enough information.

I have 2 computers, thinkpad T42 (i386) and sun ultra 10 (sparc64).
Both are running current. I've tried to check in the kernel
configuration files (GENERIC) where I can enable RTHREADS option, but
couldn't find one.

$ uname -a
OpenBSD ultra.home.lan 4.3 GENERIC#1614 sparc64
$
# find / -name librthre*
/usr/src/lib/librthread
#

The goal of my exercise is to check how much more responsive RTHREADS
is vs PTHREADS scheduler on network level (i.e. shorter ping
_response_ times, etc).
>  (I use rthreads myself for a few programs, though I had to patch a
>  number of bugs in the kernel support and librthread to make it stable
>  and there are still issues when used with several programs.  The patch
>  set I use can be found in the archives.)

I have tried to apply the patch to fresh source, only to see all 5 steps fail.

-------------------------
Patching file lib/librthread/rthread_sync.c using Plan A...
Hunk #1 failed at 53.
Hunk #2 failed at 60.
Hunk #3 failed at 83.
Hunk #4 failed at 437.
Hunk #5 failed at 446.
5 out of 5 hunks failed--saving rejects to lib/librthread/rthread_sync.c.rej
done
#

Thanks for any cluesticks in advance,

Maxim

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Chris Kuethe
On Fri, May 2, 2008 at 12:11 PM, Maxim Belooussov <[hidden email]> wrote:
>  I have 2 computers, thinkpad T42 (i386) and sun ultra 10 (sparc64).
>  Both are running current. I've tried to check in the kernel
>  configuration files (GENERIC) where I can enable RTHREADS option, but
>  couldn't find one.

if it's not listed in GENERIC (even commented out) we don't really
think it's ready to use. At all. If you do feel like testing (and
maybe, just maybe, melting your entire system) ... it's not that hard
to copy the GENERIC config and add RTHREADS. it's just another
"option".

>  The goal of my exercise is to check how much more responsive RTHREADS
>  is vs PTHREADS scheduler on network level (i.e. shorter ping
>  _response_ times, etc).

not helpful at all. ping replies are handled in kernel.

>  I have tried to apply the patch to fresh source, only to see all 5 steps fail.

Where did you get the patch from - mail? How did you get it on to your
system - cut'n'paste? I'm gonna guess you have broken line-endings or
other whitespace problems. Try "patch -lC" to ignore whitespace
changes and test if that applies. If so, maybe re-evaluate the process
you use for getting patches on to your system.

CK

--
GDB has a 'break' feature; why doesn't it have 'fix' too?

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Philip Guenther-2
On Fri, May 2, 2008 at 1:27 PM, Chris Kuethe <[hidden email]> wrote:

> On Fri, May 2, 2008 at 12:11 PM, Maxim Belooussov <[hidden email]> wrote:
>  >  I have 2 computers, thinkpad T42 (i386) and sun ultra 10 (sparc64).
>  >  Both are running current. I've tried to check in the kernel
>  >  configuration files (GENERIC) where I can enable RTHREADS option, but
>  >  couldn't find one.
>
>  if it's not listed in GENERIC (even commented out) we don't really
>  think it's ready to use. At all. If you do feel like testing (and
>  maybe, just maybe, melting your entire system) ... it's not that hard
>  to copy the GENERIC config and add RTHREADS. it's just another
>  "option".

Or better, create a new config named RTHREADS that just contains these
two lines:

include "arch/i386/conf/GENERIC"
option RTHREADS

(Or include GENERIC.MP if this is a multiprocessor box.)


>  >  The goal of my exercise is to check how much more responsive RTHREADS
>  >  is vs PTHREADS scheduler on network level (i.e. shorter ping
>  >  _response_ times, etc).
>
>  not helpful at all. ping replies are handled in kernel.

Right.  rthreads only help threaded programs that block on disk-I/O or
that have multiple CPU-bound threads.  The latter are only helped if
you really have multiple CPUs.  Programs that are just network I/O
bound will probably be *slower* with rthreads than with pthreads due
to the increased overhead.


>  >  I have tried to apply the patch to fresh source, only to see all 5 steps fail.

Wrong patch: the full one affects many more files than rthread_sync.c.

If you're still interested in playing with rthreads despite the
limited "only helps" list above and the fact that  both firefox and
openoffice are known to have issues with them, then I'll directly send
you a gzipped copy of the patch.

(Since the feedback on the patch has petered out, I suppose I should
break it into logical chunks and send them to the tech list for
piece-wise consideration.)


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Edd Barrett
In reply to this post by Chris Kuethe
On Fri, May 2, 2008 at 8:27 PM, Chris Kuethe <[hidden email]> wrote:
>  Where did you get the patch from - mail? How did you get it on to your
>  system - cut'n'paste? I'm gonna guess you have broken line-endings or
>  other whitespace problems. Try "patch -lC" to ignore whitespace
>  changes and test if that applies. If so, maybe re-evaluate the process
>  you use for getting patches on to your system.

GMail's favorite passtime is to magle diffs. To get a diff from gmail
click the little drop down and choose show original, now save the page
onto your filesystem and strip the mail message and mime type footer.

Also dont send patches using gmail, use mutt with  the IMAP extension,
or it will wrap the lines.


--

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Maxim Belooussov
In reply to this post by Chris Kuethe
Hi Philip, Chris,

>  if it's not listed in GENERIC (even commented out) we don't really
>  think it's ready to use. At all. If you do feel like testing (and
>  maybe, just maybe, melting your entire system) ... it's not that hard
>  to copy the GENERIC config and add RTHREADS. it's just another
>  "option".
This is for pure testing purposes, nothing more implied.

>
>
>  >  The goal of my exercise is to check how much more responsive RTHREADS
>  >  is vs PTHREADS scheduler on network level (i.e. shorter ping
>  >  _response_ times, etc).
>
>  not helpful at all. ping replies are handled in kernel.

Under etc. I meant a small java-based internal benchmark set (few
small utilities). Java runs in userspace, as far as I know.

>  >  I have tried to apply the patch to fresh source, only to see all 5 steps fail.
>
>  Where did you get the patch from - mail? How did you get it on to your
>  system - cut'n'paste? I'm gonna guess you have broken line-endings or
>  other whitespace problems. Try "patch -lC" to ignore whitespace
>  changes and test if that applies. If so, maybe re-evaluate the process
>  you use for getting patches on to your system.

Ignore whitespace did the trick:

Patching file lib/librthread/rthread_sync.c using Plan A...
Hunk #1 succeeded at 53.
Hunk #2 succeeded at 60.
Hunk #3 succeeded at 83.
Hunk #4 succeeded at 437.
Hunk #5 succeeded at 446.
done
#

That's the cluestick that I'm really thankful for.

I'm happy I've unintentionally made a mess out of my first patching
attempt, 'cause that's the only way to learn (and something to look
and laugh at after some years)! :)

Maxim Belooussov

Reply | Threaded
Open this post in threaded view
|

Re: -current and rthreads

Ted Unangst-2
In reply to this post by Philip Guenther-2
On 5/2/08, Philip Guenther <[hidden email]> wrote:
>  (Since the feedback on the patch has petered out, I suppose I should
>  break it into logical chunks and send them to the tech list for
>  piece-wise consideration.)

My fault, as usual.  If you'd do that, I'll try to get them reviewed
and committed soon.  I only glanced at them before, but they seemed
helpful.