In OpenSolaris, when a real-time thread gets blocked it calls rt_yield(..)
correct? or is there any other/more function that a thread "calls" when it gets
blocked and put on a sleep queue?
thanks
This message posted from opensolaris.org
___
opensol
> ***CODE***
> void *t_thread(void *p){ some work }
>
> rtparms_t rtp;
> struct sched_param sp;
> pthread_t t_1;
>
> //Setting some params to rtp;
>
> pthread_create(&t_1, NULL, t_thread, NULL);
> sp.sched_priority = 100;
> pthread_setschedparam(t_1, SCHED_FIFO, &sp);
> //Want to have RT-class
***CODE***
void *t_thread(void *p){ some work }
rtparms_t rtp;
struct sched_param sp;
pthread_t t_1;
//Setting some params to rtp;
pthread_create(&t_1, NULL, t_thread, NULL);
sp.sched_priority = 100;
pthread_setschedparam(t_1, SCHED_FIFO, &sp);
//Want to have RT-class prio 100
//Then I want to
Problem solved, did a redesign, put 99% of the code in rt.c only one line in
disp.c, probably this way it should have been done since the beginning :) now
it runs. :)
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensol
Hi, as some of you know I'm working on extending the real-time class with the
SCHED_SPORADIC policy and I'm almost done now, everything compiles the logic
should be ok, BUT when I reboot with my new kernel it wont start up, it reboots
after loading a bit. :/
So I search throw my code and find t
Hi, I'm changing some code in kernel-space, but I have a problem. In the
dispatcher /usr/src/uts/common/disp/disp.c in the swtch() function I want to
know if the current thread t is a real-time thread or not? How do I do this?
Message was edited by:
mikber-0
This message posted from
Thanks I know, but the noghtly.log file is HUGE, is there some other way to
tell what went wrong? Or what to look for in that file?
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mai
et `lx_brand'
dmake: Warning: Target `lint' not remade because of errors
dmake: Warning: Command failed for target `lib/brand/lx'
dmake: Warning: Target `lint' not remade because of errors
dmake: Warning: Target `lint' not remade because of errors
Elapsed time of
Hi, if I in kernel-space, modifying the scheduler/dispatcher, in the swtch()
(in disp.c) function and I want to know if the current thread and/or the next
thread belongs to the rt class? Is there some built in function for this like
"is_this_thread_a_rt_thread(thread)" ?
In Linux, kernel 2.6.23
Ahh, ok, hmm, sorry If I'm a little slow here, really appreciate the help.
So If I get this right, I'm extending the rt class, so I shall add my
parameters in the rtproc_t struct instead? And these parameters will be
accessible via the cldata pointer for eatch rt thread?
Then I can update this
Ok,thanks guys, hmm seems to be harder than I thougth. :(
Thing I want to do is just add some parameters the the kthread_t struct, or I
have already added them, I just need to set the initial values for them, these
initial values will be different for every thread. I'm going to use theses
param
Hi, I don't know if my last post is visible or not, seems like people can't see
it? Anyway
If I want to extend the kthread_t structure with some parameter like a flag,
how do I do this?
I want to do this via the sched_param structure, when I use
pthread_createthread() and pthread_setschedpara
What I wrote in my first post, is it not visible?:
Hi, I have extend the kthread_t structute in thread.h with a
int flag;
field.
I have also extended the sched_param structure in sched.h with this flag:
int flag;
I want to set this flag via the sched_param structure, I also want it to be se
Anyone got any ideas?
Or can I do this via some priocntl syscall?
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
Hi, thanks, I tried to remove the N option, and now it compiles as it should.?
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
Hi, I have extend the kthread_t structute in thread.h with a
int flag;
field.
I have also extended the sched_param structure in sched.h with this flag:
int flag;
I want to set this flag via the sched_param structure, I also want it to be set
to 0 when I create a new pthread.
That is, in p
Hi, I have a problem when I try to compile with nightly. I have compiled some
times and it worked fined but now it started to compile "old files", that is I
get a compile error in a file, I change it then I recompile, but I still get
the same error at the same line, even thou I fixed it.?? It's
Ok, thanks for the answers, just adding some parameters to the sched_param in
sched.h and I want to use it in thread.h, but I've solved it now i think, I
just copy the the parameters from sched_param to the thread structure when I
create the thread.
This message posted from opensolaris.org
_
when I put this line in /usr/src/uts/commom/sys/thread.h
#include
located: /usr/src/head/sched.h
I can't use what I want from sched.h? do I need to specify the path in some way
when I include the file??
Message was edited by:
mikber-0
This message posted from opensolaris.org
the program I want to run is:
int main(void) {
rtparms_t *p;
long ret;
ret = priocntl(P_LWPID, 0, PC_SETXPARMS, "RT", RT_KY_PRI, 10);
printf("ret1: %d, errno %d\n", ret, errno);
ret = priocntl(P_PID, 0, PC_GETXPARMS, "RT", RT_KY_PRI, p);
printf("ret2: %d\n", ret);
ret =
perror says: invalid argument, but is perror compatible with priocntl?
errno is 22, can I get the errno msg? of do I have to check it manually? Not
that home at error handling in c. :(
I am root.
This message posted from opensolaris.org
___
opensolar
Hi, Im having a little problem using the priocntl syscall, I want to use the
PC_SETXPARMS and PC_GETXPARMS as commands.
>From the man page of priocntl I get it as I should use is it like this:
[b]priocntl(P_PID, 0, PC_SETXPARMS, "RT", RT_KY_PRI, 10);[/b]
If I want to change the class to real-t
Solved it: I just use gethrtime() it suits my needs.
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
> Hi Micke,
> micke wrote:
> > Hi, is this possible in Solaris?
> >
> > in user-space:
> >
> > process A is running, its job is to schedule
> threads.
> >
> > process B is also running, making a new thread t1,
> process B wants A to schedul
ok, thanks.
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
Hi, is it possible to track execution time of a lwp in solaris? in
kernel-space? For example if I'd like to add to the thread structure, fields
like:
-total execution time since start
-total time sleeping
etc ...
I'd guess the best way of measuring this time would be in ticks, but how do I
ge
block)
is it enough to place it in rt_wakeup() or do I need to place it in
cv_signal(), cv_broadcast() and or cv_unsleep() also?
thanks /Micke
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolari
> micke wrote:
> > FSS is not real-time ...
>
> So you are running the processes in the RT class then
> ? I asked this
> but you didn't answer.
>
> --
> Darren J Moffat
That is correct, sorry that I missed to answer that. Everything runs in the
real-time
FSS is not real-time ...
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
> micke wrote:
> > Hi, is this possible in Solaris?
> >
> > in user-space:
> >
> > process A is running, its job is to schedule
> threads.
>
> In Solaris the kernel does thread scheduling. Why
> are you trying to do
> thread scheduling in a use
just be an int when I use pthread_self(), I get lets say 1.
That make no sense for process A, since 1 is just the "local" thread id in
process B.
So how do I get to "global" thread id? and how to best send this to process A?
Thanks
/Micke
This message posted
:) ok, but it wont work, not don't "standard stuff" so
Any way just tried this:
kthread_t *daemon;
pcparms_t pcparms;
rtparms_t *rtparmsp;
id_t tid;
int rt_id;
rt_id = rt_class_id;
pcparms.pc_cid = rt_id;
rtparmsp = (struct rtparms *)pcparms.pc_clparms;
In linux if I use pthread_self() I get a pthread_t struct, that I have no
access to anything in?? I don't know how to pick out the thread id from
pthread_t in linux, that why I use the syscall. If anyone knows how, please let
me know.
In solaris it's "easier" pthread_t is a kthread_t and I can
I've tryed:
kthread_t *t;
pid_t tid;
t = (kthread_t *)pthread_self();
tid = (pid_t)&t->t_tid;
that works I think, the t_tid is the current threads id right?
but the I want to change the scheduling class for this thread:
sched_setscheduler(tid, SCHED_FIFO, &sp);
This wont work, I get:
: No su
hi, in lunix I can do following:
tid = syscall(SYS_gettid);
to get the thread id of the current thread.
How do I do this in solaris?
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://
ion of the public documented
interfaces available for the DTrace facility.
And in the book "Solaris Dynamic Tracing Guide" I don't find any info about
how to use dtrace from a application. Nor anything about the libdtrace library?
Got any pointers for this?
Thanks
/Micke
Hi, thanks, the DTRACE_SCHED(sleep) is exactly where I want to capture the
time. Haven't had the time to read throw the dtrace book yet, but is it
possible to extract this value? in kernel-space? also in user-space?
This message posted from opensolaris.org
Thanks for the answer, but thats in libc? The functionality I search for is in
the kernel.
Found this myself:
http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/syscall/lwp_sobj.c
The function lwp_block() have a sleepq_insert(&sqh->sq_queue, t); function that
seems promi
Hi, I'm in need of knowing exactly where in the code the sleep q(s) are
implemented?
That is, when a thread do a system call and gets blocked, where do this happen?
What functions are call by the thread?
I need to capture the time of this event ...
This message posted from opensolaris.org
_
mented so to say ... hmm hope you
understand what I mean.
Any help is appreciated.
Thanks.
/Micke
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
ok, I know, already reading that book, great book btw. :) So the code for
changing for ex sched_rr is all over then ... hmm ... ok, I'll keep browsing
code n reading the book.
more pointers are also welcome. ;)
This message posted from opensolaris.org
Been looking throu the code for a while now but I can't seem to find where the
"main" function for scheduling is. I'm interested in where the SCHD_FIFO and
SCHED_RR in the real-time class are done. That is where is the time quantum for
RR set/checked? where are threads picked from the real-time
Is it possible Possible to ad a new scheduler to the OpenSolaris kernel?
Anyone got some pointers to where I can get information?
Im in need of implementing the POSIX SCHED_SPORADIC scheduler under Solaris.
This message posted from opensolaris.org
__
43 matches
Mail list logo