lkml.org 
[lkml]   [2020]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 7/7] sched: Replace rq::wake_list
    On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote:
    > On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote:

    > > + BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
    > > + offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist));
    > > +
    >
    > There is no guarantee in C that
    >
    > type1 a;
    > type2 b;
    >
    > in two different data structures means that offsetof(b) - offsetof(a)
    > is the same in both data structures unless attributes such as
    > __attribute__((__packed__)) are used.

    Do tell more; the alignment requirements and size of the types remains
    the same, this resulting in different layout is unlikely.

    I found this excellent quote on Hacker News this morning:

    "I think the attitude of compiler writers is a good reason to fix the
    spec so they can't keep ratfucking developers trying to get work done."

    > As result, this does and will cause a variety of build errors depending
    > on the compiler version and compile flags.

    The only thing I can think of that's actually a problem is that retarded
    struct randomization stuff.

    Anyway, I'll move cleaning it up a little higher on the todo list.

    \
     
     \ /
      Last update: 2020-06-05 10:12    [W:3.357 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site