[lkml]   [2008]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH 2/4] checkpoint/restart: x86 support
    On Friday 08 August 2008, Oren Laadan wrote:

    > > It seems weird that you use __u64 members for the registers, but don't
    > > include r8..r15 in the list. As a consequence, this structure does not
    > > seem well suited for either x86-32 or x86-64.
    > In the context of CR, x86-32 and x86-64 are distinct architectures because
    > you cannot always migrate from one to the other (though 32->64 is sometimes
    > possible). Therefore, each architecture can have a separate checkpoint file
    > format (eg r8..r15 only for x86-64).

    So why do you use __u64 members for your 32 bit registers?

    > Except for this special case (32 bit running 64 bit), simple conversion can
    > be done in the kernel if needed, but most conversion between kernel the
    > format for different kernel versions (should it change) can be done in
    > user space (eg. with a filter).

    The 32bit on 64bit case is quite common on non-x86 architectures, e.g.
    powerpc or sparc, where 64 bit kernels typically run 32 bit user space.

    A particularly interesting case is mixing 32 and 64 bit tasks in a container
    that you are checkpointing. This is a very realistic scenario, so there
    may be good arguments for keeping the format identical between the variations
    of each architecture.

    > > I would suggest either using struct pt_regs by reference, or defining
    > > it so that you can use the same structure for both 32 and 64 bit x86.
    > We prefer not to use the kernel structure directly, but an intermediate
    > structure that can help mitigate subtle incompatibilities issues (between
    > kernel configurations, versions, and even compiler versions).
    > Anyway, either a single structure for both 32 and 64 bit x86, or separate
    > "struct cr_hdr_cpu{_32,_64}", one for each architecture.

    struct pt_regs is part of the kernel ABI, it will not change.

    Arnd <><

     \ /
      Last update: 2008-08-09 00:33    [W:0.028 / U:17.964 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site