All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions about struct task_struct
@ 2014-08-06 22:11 Nick Krause
  2014-08-06 22:23 ` Venkatram Tummala
  2014-08-07 20:05 ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Krause @ 2014-08-06 22:11 UTC (permalink / raw)
  To: kernelnewbies

I am new to kernel programming and have a lot  questions about this
structure. Also if after you guys reply I have a few \
questions for Greg Kroah Hartman about usb development and stable
trees. I am very excited about learning this properly
now and if anyone notices something wrong in my understanding please
let me known :).
Thanks So Much,
Nick
Questions about task_struct
1.volatile long state; Is this line like jiffies for timers with
regards to the keyword volatile?
2.void *stack; Is this a pointer to the kernel stack for the process
related to the process
that the structure is keeping data for and is void to make it an
opaque data type? Is this
normally an int or some other data type when called with most processes?
3.unsigned int flags; /* per process flags, defined below */, My only
question about this is
what flags are there and are these the ifdef statements in the struct?
4.Why are we making the usage count atomic?(pretty obvious but real
world reasons would be great)
5.I assume int ptrace is for ptrace or debugged processes? If I wrong
please let me known too.
6. What is wakkee_flips and wakkee_flips_decay used for?
7.This is probably a stupid question but are these the scheduler cases for CFS?
1240 int on_rq;
1241
1242 int prio, static_prio, normal_prio;
1243 unsigned int rt_priority;
1244 const struct sched_class *sched_class;
1245 struct sched_entity se;
1246 struct sched_rt_entity rt;
1247 #ifdef CONFIG_CGROUP_SCHED
1248 struct task_group *sched_task_group;
1249 #endif
1250 struct sched_dl_entity dl;
8.What are preempt notifiers and what are they for?(another stupid question)
9. Are these lines for the policy used and to block certain processes
to only a few processors?
1261 unsigned int policy;
1262 int nr_cpus_allowed;
1263 cpumask_t cpus_allowed;
8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
workloads or locking as I heard a lot about
them on the threads on the lkml?

P.S. Sorry about some many questions,. Answer then whenever you guys
have time and if there stupid and easily found
somewhere let me known.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-06 22:11 Questions about struct task_struct Nick Krause
@ 2014-08-06 22:23 ` Venkatram Tummala
  2014-08-06 22:33   ` Nick Krause
  2014-08-07  0:26   ` Andev
  2014-08-07 20:05 ` Valdis.Kletnieks at vt.edu
  1 sibling, 2 replies; 7+ messages in thread
From: Venkatram Tummala @ 2014-08-06 22:23 UTC (permalink / raw)
  To: kernelnewbies

On 08/06/2014 03:11 PM, Nick Krause wrote:
> I am new to kernel programming and have a lot  questions about this
> structure. Also if after you guys reply I have a few \
> questions for Greg Kroah Hartman about usb development and stable
> trees. I am very excited about learning this properly
> now and if anyone notices something wrong in my understanding please
> let me known :).
> Thanks So Much,
> Nick
> Questions about task_struct
> 1.volatile long state; Is this line like jiffies for timers with
> regards to the keyword volatile?
> 2.void *stack; Is this a pointer to the kernel stack for the process
> related to the process
> that the structure is keeping data for and is void to make it an
> opaque data type? Is this
> normally an int or some other data type when called with most processes?
> 3.unsigned int flags; /* per process flags, defined below */, My only
> question about this is
> what flags are there and are these the ifdef statements in the struct?
> 4.Why are we making the usage count atomic?(pretty obvious but real
> world reasons would be great)
> 5.I assume int ptrace is for ptrace or debugged processes? If I wrong
> please let me known too.
> 6. What is wakkee_flips and wakkee_flips_decay used for?
> 7.This is probably a stupid question but are these the scheduler cases for CFS?
> 1240 int on_rq;
> 1241
> 1242 int prio, static_prio, normal_prio;
> 1243 unsigned int rt_priority;
> 1244 const struct sched_class *sched_class;
> 1245 struct sched_entity se;
> 1246 struct sched_rt_entity rt;
> 1247 #ifdef CONFIG_CGROUP_SCHED
> 1248 struct task_group *sched_task_group;
> 1249 #endif
> 1250 struct sched_dl_entity dl;
> 8.What are preempt notifiers and what are they for?(another stupid question)
> 9. Are these lines for the policy used and to block certain processes
> to only a few processors?
> 1261 unsigned int policy;
> 1262 int nr_cpus_allowed;
> 1263 cpumask_t cpus_allowed;
> 8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
> workloads or locking as I heard a lot about
> them on the threads on the lkml?

Go learn C first.

BTW, We all know that you were here on the mailing list before with the 
name "James Bond". Now, its Nick Krause. You have irritated many guys 
before this. Unfortunately, changing the name wont change the attitude.

I am pretty sure you will come back with a different name now.

Dude, seriously. Stop it.!

>
> P.S. Sorry about some many questions,. Answer then whenever you guys
> have time and if there stupid and easily found
> somewhere let me known.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-06 22:23 ` Venkatram Tummala
@ 2014-08-06 22:33   ` Nick Krause
  2014-08-07  0:26   ` Andev
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Krause @ 2014-08-06 22:33 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Aug 6, 2014 at 6:23 PM, Venkatram Tummala
<venkatram867@gmail.com> wrote:
> On 08/06/2014 03:11 PM, Nick Krause wrote:
>> I am new to kernel programming and have a lot  questions about this
>> structure. Also if after you guys reply I have a few \
>> questions for Greg Kroah Hartman about usb development and stable
>> trees. I am very excited about learning this properly
>> now and if anyone notices something wrong in my understanding please
>> let me known :).
>> Thanks So Much,
>> Nick
>> Questions about task_struct
>> 1.volatile long state; Is this line like jiffies for timers with
>> regards to the keyword volatile?
>> 2.void *stack; Is this a pointer to the kernel stack for the process
>> related to the process
>> that the structure is keeping data for and is void to make it an
>> opaque data type? Is this
>> normally an int or some other data type when called with most processes?
>> 3.unsigned int flags; /* per process flags, defined below */, My only
>> question about this is
>> what flags are there and are these the ifdef statements in the struct?
>> 4.Why are we making the usage count atomic?(pretty obvious but real
>> world reasons would be great)
>> 5.I assume int ptrace is for ptrace or debugged processes? If I wrong
>> please let me known too.
>> 6. What is wakkee_flips and wakkee_flips_decay used for?
>> 7.This is probably a stupid question but are these the scheduler cases for CFS?
>> 1240 int on_rq;
>> 1241
>> 1242 int prio, static_prio, normal_prio;
>> 1243 unsigned int rt_priority;
>> 1244 const struct sched_class *sched_class;
>> 1245 struct sched_entity se;
>> 1246 struct sched_rt_entity rt;
>> 1247 #ifdef CONFIG_CGROUP_SCHED
>> 1248 struct task_group *sched_task_group;
>> 1249 #endif
>> 1250 struct sched_dl_entity dl;
>> 8.What are preempt notifiers and what are they for?(another stupid question)
>> 9. Are these lines for the policy used and to block certain processes
>> to only a few processors?
>> 1261 unsigned int policy;
>> 1262 int nr_cpus_allowed;
>> 1263 cpumask_t cpus_allowed;
>> 8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
>> workloads or locking as I heard a lot about
>> them on the threads on the lkml?
>
> Go learn C first.
>
> BTW, We all know that you were here on the mailing list before with the
> name "James Bond". Now, its Nick Krause. You have irritated many guys
> before this. Unfortunately, changing the name wont change the attitude.
>
> I am pretty sure you will come back with a different name now.
>
> Dude, seriously. Stop it.!
>
>>
>> P.S. Sorry about some many questions,. Answer then whenever you guys
>> have time and if there stupid and easily found
>> somewhere let me known.
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

No I not coming back with another name, I would like my questions
answered first.
Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-06 22:23 ` Venkatram Tummala
  2014-08-06 22:33   ` Nick Krause
@ 2014-08-07  0:26   ` Andev
  2014-08-07  0:35     ` Nick Krause
  1 sibling, 1 reply; 7+ messages in thread
From: Andev @ 2014-08-07  0:26 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Aug 6, 2014 at 6:23 PM, Venkatram Tummala
<venkatram867@gmail.com> wrote:

> Go learn C first.

I don't think you need to flame him like this. Atlast he asked a
relevant question. Answer it if you have the patience or ignore him.

>
> BTW, We all know that you were here on the mailing list before with the
> name "James Bond". Now, its Nick Krause. You have irritated many guys
> before this. Unfortunately, changing the name wont change the attitude.
>

If he is actually doing this, there is no point in replying to his
emails. That is only giving him attention. Ignore and let him be (or
ban him, which I think is not warranted _yet_).

-- 
Andev

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-07  0:26   ` Andev
@ 2014-08-07  0:35     ` Nick Krause
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Krause @ 2014-08-07  0:35 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Aug 6, 2014 at 8:26 PM, Andev <debiandev@gmail.com> wrote:
> On Wed, Aug 6, 2014 at 6:23 PM, Venkatram Tummala
> <venkatram867@gmail.com> wrote:
>
>> Go learn C first.
>
> I don't think you need to flame him like this. Atlast he asked a
> relevant question. Answer it if you have the patience or ignore him.
>
>>
>> BTW, We all know that you were here on the mailing list before with the
>> name "James Bond". Now, its Nick Krause. You have irritated many guys
>> before this. Unfortunately, changing the name wont change the attitude.
>>
>
> If he is actually doing this, there is no point in replying to his
> emails. That is only giving him attention. Ignore and let him be (or
> ban him, which I think is not warranted _yet_).
>
> --
> Andev
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Andev,
I want to thank you for standing up to me here and out I am not
changing my email at all since I have started posting to the list
so I am not trying to spam you guys. On the other hand due to waste of
developer time I am banned from LKML, which is  due
to me not listening and I so deserve it for now. On the other hand  I
would like to work my way back up to being on the list again
and helping out.
Cheers Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-06 22:11 Questions about struct task_struct Nick Krause
  2014-08-06 22:23 ` Venkatram Tummala
@ 2014-08-07 20:05 ` Valdis.Kletnieks at vt.edu
  2014-08-07 20:32   ` Nick Krause
  1 sibling, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-08-07 20:05 UTC (permalink / raw)
  To: kernelnewbies

On Wed, 06 Aug 2014 18:11:30 -0400, Nick Krause said:

> 1.volatile long state; Is this line like jiffies for timers with
> regards to the keyword volatile?

Why should it be any different?

> 2.void *stack; Is this a pointer to the kernel stack for the process
> related to the process
> that the structure is keeping data for and is void to make it an
> opaque data type? Is this
> normally an int or some other data type when called with most processes?

Under what conditions would it be an int?  Think a bit.

> 3.unsigned int flags; /* per process flags, defined below */, My only
> question about this is
> what flags are there and are these the ifdef statements in the struct?

You explain what "ifdef statements in the struct" means, and maybe
we'll be able to explain that to you..

> 4.Why are we making the usage count atomic?(pretty obvious but real
> world reasons would be great)

If you don't understand why usage and reference counts need to be atomic,
you've got a *lot* to learn about race conditions.

> 8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
> workloads or locking as I heard a lot about
> them on the threads on the lkml?

Start looking at Kconfig files.  Most of them are documented.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140807/fe7c6827/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Questions about struct task_struct
  2014-08-07 20:05 ` Valdis.Kletnieks at vt.edu
@ 2014-08-07 20:32   ` Nick Krause
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Krause @ 2014-08-07 20:32 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Aug 7, 2014 at 4:05 PM,  <Valdis.Kletnieks@vt.edu> wrote:
> On Wed, 06 Aug 2014 18:11:30 -0400, Nick Krause said:
>
>> 1.volatile long state; Is this line like jiffies for timers with
>> regards to the keyword volatile?
>
> Why should it be any different?
>
>> 2.void *stack; Is this a pointer to the kernel stack for the process
>> related to the process
>> that the structure is keeping data for and is void to make it an
>> opaque data type? Is this
>> normally an int or some other data type when called with most processes?
>
> Under what conditions would it be an int?  Think a bit.
>
>> 3.unsigned int flags; /* per process flags, defined below */, My only
>> question about this is
>> what flags are there and are these the ifdef statements in the struct?
>
> You explain what "ifdef statements in the struct" means, and maybe
> we'll be able to explain that to you..
>
>> 4.Why are we making the usage count atomic?(pretty obvious but real
>> world reasons would be great)
>
> If you don't understand why usage and reference counts need to be atomic,
> you've got a *lot* to learn about race conditions.
>
>> 8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
>> workloads or locking as I heard a lot about
>> them on the threads on the lkml?
>
> Start looking at Kconfig files.  Most of them are documented.
Thanks Valdis,
I was just curious if I was correct in my understanding of task struct,
seems I am so far and yes I do known why we have reference counting,
I was more curious about how to trace issues with this for debugging.
Regards Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-07 20:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 22:11 Questions about struct task_struct Nick Krause
2014-08-06 22:23 ` Venkatram Tummala
2014-08-06 22:33   ` Nick Krause
2014-08-07  0:26   ` Andev
2014-08-07  0:35     ` Nick Krause
2014-08-07 20:05 ` Valdis.Kletnieks at vt.edu
2014-08-07 20:32   ` Nick Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.