Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, i want to know the contribution of #define rb_entry(ptr,type,member) container_of(ptr,type,member) macro Line 50 of rbtree.h in process scheduling. The macro has been used in __enqueue_entity() defined in fair.c Want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2014
    Posts
    8

    rb_entry() macro in rbtree.h


    Hi,

    i want to know the contribution of #define rb_entry(ptr,type,member) container_of(ptr,type,member) macro Line 50 of rbtree.h in process scheduling. The macro has been used in __enqueue_entity() defined in fair.c

    Want to know where is the process and their vruntime are stored..

    Need explaination in detail.

    Any help in this regard will be highly appreciable.

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,016
    The rb in rb_entry refers to a red-black tree. Linux uses a tree as defined in linux/rbtree.h to store runnable processes. The scheduler searches through to find the smallest vruntime to run next.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •