From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CAA97A00C2; Mon, 23 May 2022 15:31:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 804974014F; Mon, 23 May 2022 15:31:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id AC10340141 for ; Mon, 23 May 2022 15:31:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653312696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4sIfUlYPjBKWiCWad4NReYziIPfRORxZBfcZiJIyffE=; b=SllJg2TejKpysqdFr+oUed9x/QA/iNfz4FjATKneR8CkoEL1wUeAAWb3bQ6EChl+l3UAjm ww3lhbVoofp+pAMn7Vx9CD8xIdjGum0iWtYmHUWwtZ+TL/s4+ybbwpo1Q4rAumYUcqodbF DcaDkQUQAKzuExEcvAyrhNATTNTK3CU= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-3VCcrKCANB2W86n0dw2aSw-1; Mon, 23 May 2022 09:31:34 -0400 X-MC-Unique: 3VCcrKCANB2W86n0dw2aSw-1 Received: by mail-lj1-f200.google.com with SMTP id h13-20020a2e530d000000b00253e20a7a3dso877569ljb.7 for ; Mon, 23 May 2022 06:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4sIfUlYPjBKWiCWad4NReYziIPfRORxZBfcZiJIyffE=; b=aMQmVV0UCYrb3A6ZoyeAr+pm6KI8ikBkyhe31bBa9UHRnv21KhzJScbpalTT9HHdHg smEc9s/urTN0t980HCzxwC5VEpZyCcTYC2sUPjvUigMRV5uFbKO/46ZRLVRROeiF6hUX 1cGpgFSVFEUoOBbUTbnZ56Y1LJS4b7Kh1Hosv9g4xWRE0hlMFwKznZq3TUojopRiKeRk a+5hoEhLsm4HnyGVeTxVVZFoNU1QiyCE2gGWi8uu5YOc+rT6QVTqOLZJg9DKHAWOP+dp Hkr+fEQHbtmDV8RHVh/y0ssNxda8AHf9s0tCYcR6rw5ikd8gvEHPdmLwS8aWwJ+wFlaz cUyA== X-Gm-Message-State: AOAM53256NVhlo0WtmIYAy3CkC2ch84UZZdhguH9ECzwqvAVfusNmKaG 0mu3btaN5pTNN6oScYpZ4mQpAMDm90lmnse6ORoSNN8q/NUxJOKLuzfDiYbJjQ7MVHC2qJKB+KO ziOpvWprZmc9PzY245C0= X-Received: by 2002:a19:9102:0:b0:477:bbc5:182c with SMTP id t2-20020a199102000000b00477bbc5182cmr15866261lfd.265.1653312693179; Mon, 23 May 2022 06:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWIu3eGUn2jdEGfM+CU7jzI9s6SlPsIWAStfiWkioZtsEE33tF+HbYOG1WwciDgzyh4eQ+UckENZWw1budTaE= X-Received: by 2002:a19:9102:0:b0:477:bbc5:182c with SMTP id t2-20020a199102000000b00477bbc5182cmr15866248lfd.265.1653312692962; Mon, 23 May 2022 06:31:32 -0700 (PDT) MIME-Version: 1.0 References: <20220510115758.457794-1-kda@semihalf.com> <20220511150725.744021-1-kda@semihalf.com> In-Reply-To: From: David Marchand Date: Mon, 23 May 2022 15:31:21 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] test/ring: remove excessive inlining To: Stanislaw Kardach Cc: Bruce Richardson , Honnappa Nagarahalli , dev , Frank Zhao , Sam Grove , Marcin Wojtas , upstream@semihalf.com, Konstantin Ananyev Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, May 11, 2022 at 5:49 PM Bruce Richardson wrote: > > On Wed, May 11, 2022 at 05:07:25PM +0200, Stanislaw Kardach wrote: > > Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause > > the compiled code to grow extensively when compiled with no optimization > > (-O0 or -Og). This is default in the meson's debug configuration. This > > can collide with compiler bugs and cause issues during linking of unit > > tests where the api_type or esize are non-const variables causing > > inlining cascade. In perf tests this is not the case in perf-tests as > > esize and api_type are const values. > > > > One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and > > no fix still in 12.1) is generating a short relative jump instruction > > (J ) for goto and for loops. When loop body grows extensively in > > ring test, the target offset goes beyond supported offfset of +/- 1MB > > from PC. This is an obvious bug in the GCC as RISC-V has a > > two-instruction construct to jump to any absolute address (AUIPC+JALR). > > > > However there is no reason to force inlining as the test code works > > perfectly fine without it. > > > > GCC has a bug report for a similar case (with conditionals): > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93062 > > > > Fixes: a9fe152363 test/ring: add custom element size functional tests Fixes: a9fe152363e2 ("test/ring: add custom element size functional tests") > > > > Signed-off-by: Stanislaw Kardach > Acked-by: Bruce Richardson Reviewed-by: Honnappa Nagarahalli Acked-by: Konstantin Ananyev Applied, thanks. -- David Marchand