* how set_user_nice() function is called @ 2011-11-20 17:31 Enes Albay - انس الباى 2011-11-21 1:59 ` Mulyadi Santosa 0 siblings, 1 reply; 4+ messages in thread From: Enes Albay - انس الباى @ 2011-11-20 17:31 UTC (permalink / raw) To: kernelnewbies Hi! anybody knows that where is set_user_nice() function called in the kernel? i couldn't find that. i just found that in forking operation do_fork()->copy_process()-> dup_task_struct() called then set_user_nice() called but i couldn't find that where. Also how/where do_fork() function called in kernel i couldn't find. Thanks in advance... -- Enes Albay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111120/6e60968f/attachment.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* how set_user_nice() function is called 2011-11-20 17:31 how set_user_nice() function is called Enes Albay - انس الباى @ 2011-11-21 1:59 ` Mulyadi Santosa 2011-11-22 10:23 ` Enes Albay - انس الباى 0 siblings, 1 reply; 4+ messages in thread From: Mulyadi Santosa @ 2011-11-21 1:59 UTC (permalink / raw) To: kernelnewbies On Mon, Nov 21, 2011 at 00:31, Enes Albay - ??? ????? <albayenes@gmail.com> wrote: > Hi! > > anybody knows that where is set_user_nice() function called in the kernel? > i couldn't find that. ?i just found that in forking operation > do_fork()->copy_process()-> > dup_task_struct() called then set_user_nice() > called but i couldn't find that where. Also how/where do_fork() function > called in kernel i couldn't find. In x86, do_fork() is called from sys_fork()... check : http://lxr.linux.no/#linux+v3.1.1/arch/x86/kernel/process.c#L235 While sys_fork() itself, since it's a syscall handler, is called from entry.S. Please refer to: http://lxr.linux.no/#linux+v3.1.1/arch/x86/ia32/ia32entry.S#L475 -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* how set_user_nice() function is called 2011-11-21 1:59 ` Mulyadi Santosa @ 2011-11-22 10:23 ` Enes Albay - انس الباى 2011-11-23 8:55 ` rohan puri 0 siblings, 1 reply; 4+ messages in thread From: Enes Albay - انس الباى @ 2011-11-22 10:23 UTC (permalink / raw) To: kernelnewbies Thanks for reply. I also asked that set_user_nice where and when is called(file and line). I think it is not called after each forking operation, isn't it? Could you give calling order between functions from do_fork() like that func1()->func2()->... Regards. On Mon, Nov 21, 2011 at 3:59 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com>wrote: > On Mon, Nov 21, 2011 at 00:31, Enes Albay - ??? ????? > <albayenes@gmail.com> wrote: > > Hi! > > > > anybody knows that where is set_user_nice() function called in the > kernel? > > i couldn't find that. i just found that in forking operation > > do_fork()->copy_process()-> > > dup_task_struct() called then set_user_nice() > > called but i couldn't find that where. Also how/where do_fork() function > > called in kernel i couldn't find. > > In x86, do_fork() is called from sys_fork()... check : > http://lxr.linux.no/#linux+v3.1.1/arch/x86/kernel/process.c#L235 > > While sys_fork() itself, since it's a syscall handler, is called from > entry.S. Please refer to: > http://lxr.linux.no/#linux+v3.1.1/arch/x86/ia32/ia32entry.S#L475 > > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > -- Enes Albay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111122/e2cff638/attachment.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* how set_user_nice() function is called 2011-11-22 10:23 ` Enes Albay - انس الباى @ 2011-11-23 8:55 ` rohan puri 0 siblings, 0 replies; 4+ messages in thread From: rohan puri @ 2011-11-23 8:55 UTC (permalink / raw) To: kernelnewbies On Tue, Nov 22, 2011 at 3:53 PM, Enes Albay - ??? ????? <albayenes@gmail.com > wrote: > Thanks for reply. > > I also asked that set_user_nice where and when is called(file and line). > I think it is not called after each forking operation, isn't it? Could you > give calling order between functions from do_fork() like that > func1()->func2()->... > > Regards. > > On Mon, Nov 21, 2011 at 3:59 AM, Mulyadi Santosa < > mulyadi.santosa at gmail.com> wrote: > >> On Mon, Nov 21, 2011 at 00:31, Enes Albay - ??? ????? >> <albayenes@gmail.com> wrote: >> > Hi! >> > >> > anybody knows that where is set_user_nice() function called in the >> kernel? >> > i couldn't find that. i just found that in forking operation >> > do_fork()->copy_process()-> >> > dup_task_struct() called then set_user_nice() >> > called but i couldn't find that where. Also how/where do_fork() function >> > called in kernel i couldn't find. >> >> In x86, do_fork() is called from sys_fork()... check : >> http://lxr.linux.no/#linux+v3.1.1/arch/x86/kernel/process.c#L235<http://lxr.linux.no/#linux+v3.1.1/arch/x86/kernel/process.c%23L235> >> >> While sys_fork() itself, since it's a syscall handler, is called from >> entry.S. Please refer to: >> http://lxr.linux.no/#linux+v3.1.1/arch/x86/ia32/ia32entry.S#L475<http://lxr.linux.no/#linux+v3.1.1/arch/x86/ia32/ia32entry.S%23L475> >> >> >> >> -- >> regards, >> >> Mulyadi Santosa >> Freelance Linux trainer and consultant >> >> blog: the-hydra.blogspot.com >> training: mulyaditraining.blogspot.com >> > > > > -- > Enes Albay > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > make use of cscope to get the locations from whr set_user_nice() is called. I did egrep pattern search using cscope and could see it getting called from many locations : - 0 loop.c 578 set_user_nice(current, -20); 1 nbd.c 505 set_user_nice(current, -20); 2 pktcdvd.c 1567 set_user_nice(current, -20); 3 ipmi_si_intf.c 1012 set_user_nice(current, 19); 4 dmatest.c 291 set_user_nice(current, 10); 5 ap_bus.c 1563 set_user_nice(current, 19); 6 bnx2fc_fcoe.c 436 set_user_nice(current, -20); 7 bnx2fc_fcoe.c 567 set_user_nice(current, -20); 8 fcoe.c 1646 set_user_nice(current, -20); 9 ibmvfc.c 4438 set_user_nice(current, -20); a ibmvscsi.c 1891 set_user_nice(current, -20); b lpfc_hbadisc.c 715 set_user_nice(current, -20); c qla_os.c 3314 set_user_nice(current, -20); d main.c 2322 set_user_nice(speakup_task, 10); e target_core_transport.c 6091 set_user_nice(current, -20); f tfc_cmd.c 702 set_user_nice(current, -20); g fs-writeback.c 902 set_user_nice(current, 0); h background.c 83 set_user_nice(current, 10); i heartbeat.c 1093 set_user_nice(current, -20); j sched.h 2037 extern void set_user_nice(struct task_struct *p, long nice); k exit.c 350 set_user_nice(current, 0); l hung_task.c 195 set_user_nice(current, 0); m kmod.c 157 set_user_nice(current, 0); n rcutorture.c 867 set_user_nice(current, 19); o rcutorture.c 910 set_user_nice(current, 19); p rcutorture.c 993 set_user_nice(current, 19); q rcutree_plugin.h 1452 set_user_nice(current, 19); r rtmutex-tester.c 307 set_user_nice(current, 0); s sched.c 4880 void set_user_nice(struct task_struct *p, long nice) t sched.c 4925 EXPORT_SYMBOL(set_user_nice); u sched.c 4977 set_user_nice(current, nice); v sched.c 8271 set_user_nice(p, 0); w sys.c 168 set_user_nice(p, niceval); x ring_buffer_benchmark.c 453 set_user_nice(consumer, consumer_nice); y ring_buffer_benchmark.c 462 set_user_nice(producer, producer_nice); z workqueue.c 2034 set_user_nice(current, RESCUER_NICE_LEVEL); A backing-dev.c 272 set_user_nice(current, 0); ?????????, ???? ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111123/75b75131/attachment-0001.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-23 8:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-20 17:31 how set_user_nice() function is called Enes Albay - انس الباى 2011-11-21 1:59 ` Mulyadi Santosa 2011-11-22 10:23 ` Enes Albay - انس الباى 2011-11-23 8:55 ` rohan puri
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).