Commit Graph

1358 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
2d8fefb8f5 main: remove obsolete deletion method 2023-08-22 12:10:46 +02:00
Thomas Schoebel-Theuer
8e63032af3 main: remove obsolete compat_deletions 2023-08-22 12:10:46 +02:00
Thomas Schoebel-Theuer
9f0a53487e main: remove compat alivelinks
Now superseded by automatic actual dir creation.
2023-08-14 13:43:44 +02:00
Thomas Schoebel-Theuer
90a6c6e0c0 main: ensure inital presence of actual dir 2023-08-14 13:43:44 +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
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
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
272b9d8e46 mem: improve pre-allocation 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
21bb01cfbd main: compute nr of locally needed resources 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
da68981a3a mem: remove superfluous parameter 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
68621e26da server: minimum SS_CONNECTED 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
0856f56918 lib_log: remove unused variable 2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
0b6b45bfd9 lib_log: remove less used code
Do not spend resources on sophisticated but
expensive trials.
2023-05-23 10:19:23 +02:00
Thomas Schoebel-Theuer
02deb644b6 main: make is_alive time window configurable 2023-05-23 10:18:25 +02:00
Thomas Schoebel-Theuer
1e3df0f96c log: tighten start_magic 2023-05-23 10:18:25 +02:00
Thomas Schoebel-Theuer
15009b1395 infra: remove unnecessary parameter 2023-04-05 13:58:08 +02:00
Andrea Gelmini
dd1e4e1323 Fix typos
[small adaptations by Thomas Schoebel-Theuer, and
some problems with LyX-specific file format fixed]
2023-04-05 13:30:38 +02:00
Thomas Schoebel-Theuer
c15a3f016d server: use thhe new delegate_free 2023-03-22 08:56:30 +01:00
Thomas Schoebel-Theuer
57f9defdf9 brick: delegate_free 2023-03-20 09:10:24 +01:00
Thomas Schoebel-Theuer
0d1a1f627a server: reduce handler_limit 2023-03-08 22:03:37 +01:00
Thomas Schoebel-Theuer
5f463ca2d5 server: remove historic dent_limit_sem 2023-03-08 22:03:37 +01:00
Thomas Schoebel-Theuer
1bbb7af74e server: remove historic server_limit_sem 2023-03-08 22:03:37 +01:00
Thomas Schoebel-Theuer
ab19f81e53 server: earlier observe handler_limit 2023-03-08 22:02:38 +01:00
Thomas Schoebel-Theuer
0ef35060f4 server: safeguard smp_mb 2023-02-27 09:50:10 +01:00
Thomas Schoebel-Theuer
ee55f32605 brick: safeguard smp_mb and barrier 2023-02-27 09:50:10 +01:00
Thomas Schoebel-Theuer
c8841486bd if: fix potential bio return status 2023-02-27 09:50:10 +01:00
Thomas Schoebel-Theuer
bc53f522a2 logger: correct interface style 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
fe62187072 client: correct interface style 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
da720955e4 sio: correct interface style 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
3ff50b3bc5 aio: correct interface style 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
f2e91d0755 bio: correct interface style 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
3b1b98e686 net: correct interface adaptation 2023-02-20 09:22:34 +01:00
Thomas Schoebel-Theuer
b0509eb759 server: shutdown all handler sockets upon rmmod 2023-02-19 17:23:39 +01:00