Linux.com

rulingminds

rulingminds

  • Linux.com Member
  • Posts: 2
  • Member Since: 31 Jul 11
  • Last Logged In: 05 Aug 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • rulingminds
    RE: Interrupts
    No, This is incrementing or decrementing the softirq count. The preempt_count is divided as follows. For softirq count there are 8 bits(from 8 - 15) in preempt_count variable. So, the variable can be incremented upto 255. This count says number of levels the softirqs are disabled(number of tymes local_bh_disable() is called) . decremented using local_bh_enable(). See the following code in softirq.c and preempt.h # define add_preempt_count(val) do { preempt_count() += (val); } while (0) static inline void __local_bh_disable(unsigned long ip, unsigned int cnt) { add_preempt_count(cnt); barrier(); } Here, count is 0x100. -Rulingminds
    Link to this post 05 Aug 11

    No, This is incrementing or decrementing the softirq count. The preempt_count is divided as follows.

    For softirq count there are 8 bits(from 8 - 15) in preempt_count variable. So, the variable can be incremented upto 255.
    This count says number of levels the softirqs are disabled(number of tymes local_bh_disable() is called) . decremented using local_bh_enable(). See the following code in softirq.c and preempt.h

    # define add_preempt_count(val) do { preempt_count() += (val); } while (0)

    static inline void __local_bh_disable(unsigned long ip, unsigned int cnt)
    {
    add_preempt_count(cnt);
    barrier();
    }

    Here, count is 0x100.


    -Rulingminds

  • rulingminds
    RE: Interrupts
    UL means long unsigned int. 1 is left shifted by SOFTIRQ_SHIFT(8) times, that means value will be 0x00000100. This macro is used to increment the softirq count in the thread_info->preempt_count at 0x00000100 offset. For linux kernel articles, visit www.rulingminds.com
    Link to this post 31 Jul 11

    UL means long unsigned int. 1 is left shifted by SOFTIRQ_SHIFT(8) times, that means value will be

    0x00000100.

    This macro is used to increment the softirq count in the thread_info->preempt_count at 0x00000100 offset.

    For linux kernel articles, visit www.rulingminds.com

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board