Commit Graph

3639 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
b0a5594693 say: simplify for newer kernels 2023-08-14 13:55:55 +02:00
Thomas Schoebel-Theuer
d69d069e7f if: adapt to 3d745ea5b09 (kernel 5.7+) 2023-08-14 13:55:42 +02:00
Thomas Schoebel-Theuer
25e3831695 pre-patches/vanilla-5.7/ 2023-08-14 13:55:42 +02:00
Thomas Schoebel-Theuer
fa8ca20220 pre-patches/vanilla-5.6/ 2023-08-14 13:55:42 +02:00
Thomas Schoebel-Theuer
1cb1950819 pre-patches/vanilla-5.5/ 2023-08-14 13:55:42 +02:00
Thomas Schoebel-Theuer
4162752064 doc: checkout BETA BUILD INSTRUCTIONS for QIO 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
7ff95fa7cf doc: updated build instructions for QIO 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
8797cca962 pre-patches/vanilla-5.3/ 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
e71e572e4d pre-patches/vanilla-5.2/ 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
07da6fb12a pre-patches/vanilla-5.1/ 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
7d7a002c5a pre-patches/vanilla-5.0/ 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
26d5f34fbd qio: new brick, replacing historic aio 2023-08-14 13:55:17 +02:00
Thomas Schoebel-Theuer
812cfa685e net: safeguard against strange compiler warnings 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
46b4739fd7 updated v3 pre-patches/vanilla-5.4/ subversion v3a 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
b176b72843 aio: adapt to semi-new pre-patch generations 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
f11993a1ee infra: classify MARS_NEEDS_OLDCOMPAT_FUNCTIONS 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
063b386dbe infra: rename _comp_*() functions to __oldcompat_*() 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
2d1c48c53b main: report new pre-patch generation, discourage old one 2023-08-14 13:54:50 +02:00
Thomas Schoebel-Theuer
397f2e93f2 say: adapt to prepatch series v3 2023-08-14 13:54:49 +02:00
Thomas Schoebel-Theuer
c2ee9e0a19 toolchains: resurrect kernel/Kconfig 2023-08-14 13:54:49 +02:00
Thomas Schoebel-Theuer
5211696890 toolchains: git mv kernel/Kconfig -> kernel/Kconfig.v5.4 2023-08-14 13:54:49 +02:00
Thomas Schoebel-Theuer
4da79493dd all: new script adapt-to-upstream-toolchains.sh 2023-08-14 13:54:49 +02:00
Thomas Schoebel-Theuer
de25b2e1ba all: release mars0.1astable168 2023-08-07 16:20:13 +02:00
Thomas Schoebel-Theuer
e273447add copy: improve state barriers 2023-08-07 16:09:50 +02:00
Thomas Schoebel-Theuer
7c59774177 copy: safeguard writeout flag 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer
b53b3777d4 copy: safeguard allocation barriers 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer
7caf2341ea copy: safeguard allocation problems 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer
49c408cac2 copy: constify state table subpages
I have seen some "strange" behaviour so infrequently, so I am unsure whether
this is a bugfix at all.

I am unsure, whether this _suspected_ bug would be in gcc, or whether
the bug would be mine.

If it is mine, then I assumed that gcc would produce better machine code
than required by ISO C.

Currently, I don't (yet) have the newest version of the ISO C standard,
so I cannot claim the truth.

Whatever: I found the _suspected_ bug by _dissassembling_ before vs after this
patch had been applied:

        .type   copy_brick_construct, @function                                                                 .type   copy_brick_construct, @function
copy_brick_construct:                                                                                   copy_brick_construct:
                                                                                                   >            pushq   %r13    #
        pushq   %r12    #                                                                                       pushq   %r12    #
        pushq   %rbp    #                                                                          |    # block/mars/kernel/mars_copy.c:        st = brick_block_alloc(0, PAGE_SIZE);
        movl    $1155, %edx     #,                                                                 <
                                                                                                   >            pushq   %rbp    #
        pushq   %rbx    #                                                                                       pushq   %rbx    #
        movl    $4096, %esi     #,                                                                 <
        movq    %rdi, %rbx      # brick, brick                                                     |            movq    %rdi, %r12      # brick, brick
                                                                                                   >            movl    $4096, %esi     #,
        xorl    %edi, %edi      #                                                                               xorl    %edi, %edi      #
        call    _brick_block_alloc      #                                                                       call    _brick_block_alloc      #
        movq    %rax, %rdx      #, tmp99                                                           |            movq    %rax, %rbx      #, _res_
        movl    $1024, %ecx     #, tmp102                                                                       movl    $1024, %ecx     #, tmp102
        movq    %rax, 408(%rbx) # tmp99, brick_11(D)->st                                           <
        movq    %rdx, %rdi      # tmp99, tmp99                                                     <
        xorl    %eax, %eax      # tmp101                                                                        xorl    %eax, %eax      # tmp101
        xorl    %ebp, %ebp      # ivtmp.179                                                        |            movq    %rbx, %rdi      # _res_, _res_
        xorl    %r12d, %r12d    # tmp106                                                           <
        rep stosl                                                                                               rep stosl
                                                                                                   >            xorl    %ebp, %ebp      # ivtmp.174
                                                                                                   >            xorl    %r13d, %r13d    # tmp105
.L26:                                                                                                   .L26:
        movl    $1172, %edx     #,                                                                 |            movl    $1177, %edx     #,
        movl    $4096, %esi     #,                                                                              movl    $4096, %esi     #,
        xorl    %edi, %edi      #                                                                               xorl    %edi, %edi      #
        call    _brick_block_alloc      #                                                                       call    _brick_block_alloc      #
        movq    %rax, %rdx      #, tmp103                                                                       movq    %rax, %rdx      #, tmp103
        movq    408(%rbx), %rax # brick_11(D)->st, brick_11(D)->st                                 |            movq    %rdx, (%rbx,%rbp,8)     # tmp103, MEM[base: _res__9, index: ivtmp.174_28, step:
                                                                                                   >            incq    %rbp    # ivtmp.174
        movl    $1024, %ecx     #, tmp107                                                          |            movq    %rax, %rdi      # tmp103, _res_
        movq    %rdx, %rdi      # tmp103, tmp103                                                   |            movl    $1024, %ecx     #, tmp106
        movq    %rdx, (%rax,%rbp)       # tmp103, *_4                                              <
        addq    $8, %rbp        #, ivtmp.179                                                       <
        movl    %r12d, %eax     # tmp106, tmp106                                                   <
        cmpq    $2048, %rbp     #, ivtmp.179                                                       |            cmpq    $256, %rbp      #, ivtmp.174
        rep stosl                                                                                               rep stosl
        jne     .L26    #,                                                                                      jne     .L26    #,
        leaq    376(%rbx), %rdi #, tmp108                                                          |            leaq    376(%r12), %rdi #, tmp107
        movq    $__key.72209, %rdx      #,                                                         |            movq    $__key.72227, %rdx      #,
        movq    $.LC3, %rsi     #,                                                                              movq    $.LC3, %rsi     #,
        call    __init_waitqueue_head   #                                                                       call    __init_waitqueue_head   #
                                                                                                   >    # block/mars/kernel/mars_copy.c:        brick->st = st;
                                                                                                   >            movq    %rbx, 408(%r12) # _res_, brick_10(D)->st
        xorl    %eax, %eax      #                                                                               xorl    %eax, %eax      #
        popq    %rbx    #                                                                                       popq    %rbx    #
        popq    %rbp    #                                                                                       popq    %rbp    #
        popq    %r12    #                                                                                       popq    %r12    #
                                                                                                   >            popq    %r13    #
        ret                                                                                                     ret

Hint: the 2-dimenional array indexing looks _suspicious_ to me.

But analysis is not as easy as one might assume.

Please help me:

If this would be really a bug in gcc (I am not sure), it should be fixed
by the upstream of gcc. Please contact me if you know / can show that

  (a) if it is _really_ a bug (currently very hard to reproduce via MARS), and
  (b) the bug is really in gcc but not mine (unsure for now), and
  (c) how to convert this into a _reproducer_ for the gcc team.

I am not sure whether this is a _full_ reproducer, because it might
depend on the arch (amd64) and/or on specific Linux kernel compile options.

I don't have the time for ananlysis of all of these, or maybe even more
thingies to do.
2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer
602d1380ec copy: reduce address evaluation
Prototect against future use of ++ operators in arguments ;)
2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer
44f371ca7f copy: convert state lvalues to references 2023-08-07 16:08:52 +02:00
Thomas Schoebel-Theuer
976857a9d7 copy: fix indirect race from index wraparound 2023-08-03 13:24:47 +02:00
Thomas Schoebel-Theuer
d3e70f11da all: release mars0.1astable167 2023-07-13 08:55:48 +02:00
Thomas Schoebel-Theuer
226a241311 marsadm: cron should delete even on closed primaries 2023-07-12 13:22:24 +02:00
Thomas Schoebel-Theuer
6f6ef7a849 marsadm: fix versionlink deletion at cron 2023-07-12 13:15:46 +02:00
Thomas Schoebel-Theuer
da5e5cb9c1 all: release mars0.1astable166 2023-05-30 10:49:55 +02:00
Thomas Schoebel-Theuer
ae8e7611d5 copy: simplify notify_clash() 2023-05-30 10:49:55 +02:00
Thomas Schoebel-Theuer
bdf8d6e7eb copy: safeguard potential race 2023-05-30 10:49:55 +02:00
Thomas Schoebel-Theuer
e58488a777 copy: factor out and simplify reset code 2023-05-30 10:49:50 +02:00
Thomas Schoebel-Theuer
d41ea13d37 copy: reduce clash overhead 2023-05-30 10:05:30 +02:00
Thomas Schoebel-Theuer
8e1e2f81a3 copy: yield CPU more often 2023-05-30 10:05:30 +02:00
Thomas Schoebel-Theuer
31788c0acf all: release mars0.1astable165 2023-05-23 10:47:41 +02:00
Thomas Schoebel-Theuer
1a53f589d4 copy: improve error code 2023-05-23 10:47:39 +02:00
Thomas Schoebel-Theuer
f5fa4a19c1 client: speedup hashing 2023-05-23 10:47:39 +02:00
Thomas Schoebel-Theuer
ada1544100 client: simplify timeout code 2023-05-23 10:47:39 +02:00
Thomas Schoebel-Theuer
63a16833a3 client: tighten checks 2023-05-23 10:47:39 +02:00
Thomas Schoebel-Theuer
f102c3094f infra: tighten list checking 2023-05-23 10:47:39 +02:00
Thomas Schoebel-Theuer
732dbc7a75 client: split _hash_insert list manipulation 2023-05-23 10:47:38 +02:00
Thomas Schoebel-Theuer
925f564e8f net: safeguard socket aliveness 2023-05-23 10:47:38 +02:00
Thomas Schoebel-Theuer
08a627703b all: release mars0.1astable164 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
272b9d8e46 mem: improve pre-allocation 2023-05-23 10:19:23 +02:00