Skip to contentSkip to conversation

Help with learning scheduler O(1)

DISCUSSION Meyer Lansky 2 participants 2 messages Mar 12, 2015 – Mar 13, 2015

lore
Share & tools
lore
#0 lore raw

Hello all
continue to study the scheduler is O(1 ) there was one difficulty with the string 2 on 3, in that these blocking occurs after lines ? a reference to the code that study - http://lxr.free-electrons.com/source/kernel/sched.c?v=2.6.36
what I learn on line 4682 to 4695.

1? rcu_read_lock();
2?? pcred = __task_cred(p);
3?? match = (cred->euid == pcred->euid ||
???????????????????? cred->euid == pcread->uid);
4?? rcu_read_unlock();

I ask because in the comments there is not described .
Thank.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150312/c259deac/attachment.html

#1 lore raw
Quoted 7 lines · Meyer Lansky

Hello all
continue to study the scheduler is O(1) there was one difficulty with the string 2 on 3, in that these blocking occurs after lines?
a reference to the code that study -
http://lxr.free-electrons.com/source/kernel/sched.c?v=2.6.36
what I learn on line 4682 to 4695.

Quoted 10 lines

1 rcu_read_lock();
2 pcred = __task_cred(p);
3 match = (cred->euid == pcred->euid ||

                     cred->euid == pcread->uid);

4 rcu_read_unlock();

I ask because in the comments there is not described. Thank.

Hi

I am not clear about your question.

perhaps specifically you asked about why rcu_read_lock() is called?

Quoted 6 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Signature · 10 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150313/dc1c2e00/attachment.html