kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: rohan.puri15@gmail.com (rohan puri)
To: kernelnewbies@lists.kernelnewbies.org
Subject: how set_user_nice() function is called
Date: Wed, 23 Nov 2011 14:25:21 +0530	[thread overview]
Message-ID: <CALJfu6OpcFnhC9by-J0t7iat8jEpT-jb6hpgMrGNex+STOTmHg@mail.gmail.com> (raw)
In-Reply-To: <CAA9-PzGd8X-uPqmjAhazuB4AdzNcBxs--tx0a_tSs7Q5GxXuQw@mail.gmail.com>

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 

      reply	other threads:[~2011-11-23  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALJfu6OpcFnhC9by-J0t7iat8jEpT-jb6hpgMrGNex+STOTmHg@mail.gmail.com \
    --to=rohan.puri15@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).