[{"id":3672325,"web_url":"http://patchwork.ozlabs.org/comment/3672325/","msgid":"<86a71314-1a1e-4af2-bf6c-351faeba0a58@baylibre.com>","list_archive_url":null,"date":"2026-04-01T15:40:12","subject":"Re: [PATCH] libgomp, nvptx: remove erroneous stack deletion","submitter":{"id":87887,"url":"http://patchwork.ozlabs.org/api/people/87887/","name":"Andrew Stubbs","email":"ams@baylibre.com"},"content":"Ping.\n\nOn 24/03/2026 13:35, Andrew Stubbs wrote:\n> From: Andrew Stubbs <ams@codesourcery.com>\n> \n> The stacks are not supposed to be deleted every time memory is allocated, only\n> when there is insufficient memory.  The unconditional call here seems to be in\n> error, and is causing a costly reallocation of the stacks before every launch.\n> \n> libgomp/\n> \n> \t* plugin/plugin-nvptx.c (cleanup_and_alloc): Remove early call to\n> \tnvptx_stacks_free.\n> ---\n> \n> This bug fix has long been used on the devel/omp/gcc-15 branch and\n> testing showed no regressions in the libgomp testsuite.\n> \n> I think this should be fine for stage 4.\n> \n> OK to commit?\n> \n> Andrew\n> \n> \n>   libgomp/plugin/plugin-nvptx.c | 2 --\n>   1 file changed, 2 deletions(-)\n> \n> diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c\n> index a540e9d4cce..bde52c89c77 100644\n> --- a/libgomp/plugin/plugin-nvptx.c\n> +++ b/libgomp/plugin/plugin-nvptx.c\n> @@ -1866,8 +1866,6 @@ cleanup_and_alloc (int ord, size_t size, bool managed)\n>     ptx_dev->free_blocks = NULL;\n>     pthread_mutex_unlock (&ptx_dev->free_blocks_lock);\n>   \n> -  nvptx_stacks_free (ptx_dev, false);\n> -\n>     while (blocks)\n>       {\n>         tmp = blocks->next;","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=zD0x3XDe;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=zD0x3XDe","sourceware.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com","sourceware.org; spf=pass smtp.mailfrom=baylibre.com","server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.128.47"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fm8Mh5F4Lz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 02:40:48 +1100 (AEDT)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 803D54BA23D9\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 15:40:46 +0000 (GMT)","from mail-wm1-f47.google.com (mail-wm1-f47.google.com\n [209.85.128.47])\n by sourceware.org (Postfix) with ESMTPS id EB1944BA2E19\n for <gcc-patches@gcc.gnu.org>; Wed,  1 Apr 2026 15:40:15 +0000 (GMT)","by mail-wm1-f47.google.com with SMTP id\n 5b1f17b1804b1-482f454be5bso11615945e9.0\n for <gcc-patches@gcc.gnu.org>; Wed, 01 Apr 2026 08:40:15 -0700 (PDT)","from [192.168.0.116]\n (hawk-18-b2-v4wan-173576-cust245.vm26.cable.virginm.net. [86.13.206.246])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4888a62616dsm9019545e9.3.2026.04.01.08.40.13\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Wed, 01 Apr 2026 08:40:13 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 803D54BA23D9","OpenDKIM Filter v2.11.0 sourceware.org EB1944BA2E19"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org EB1944BA2E19","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org EB1944BA2E19","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775058016; cv=none;\n b=maKQCBN8VzXbHeQXdZ9f6XfZkl66qQalnjokh/vdpVoAOJXWEhVdPoIQ2dSoy/t16qVLez9pGEPAoueuoUJmohIVZltz+WjvViU5erW0lzY0Wly8KD57FvmvJWP0JpE71YkORRpSijEUEtFRKceFTPcnMZDjMyuuy3QSBXB4lf4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775058016; c=relaxed/simple;\n bh=MmFcoSlptmCUFVoAZj6CBULUZo5R6FR3BELknEZW5jI=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To;\n b=cI/qKwMUAKVT6SXW8RzRNEDngyIAfhyBrzQXkpi1EisnLPDUdUBOLYznJiYro7ToOxpbiSiPwtCUFfXeYEcGzSyNPqeQ2xcJ6sb/4SsaqEFaF5xxzAuJLp/5y4Glk1CxQs9CNabf1Fz/nb81SgTOHUl1ti40+NqM7+IcbvJJOUY=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1775058014;\n x=1775662814;\n darn=gcc.gnu.org;\n h=content-transfer-encoding:in-reply-to:content-language:references\n :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to\n :cc:subject:date:message-id:reply-to;\n bh=0jrxGx58v/Lvi1lkS4mNHufc0MVkUf0Pc3D8JTx95tM=;\n b=zD0x3XDecaKzHT8pVvMDxl1CB+XPrtVFgD4Sghm7S85btrCRCtoi2TTm9hi05qk6at\n mCvnKg6l3NMwjj825ljboJ1pj4hSJkmfPfL/3AHJ8k6jUiya62FailRiSq3DvoufQhgE\n 6dUjQM3RbeK0X1PE87gkiRhcsiTQXjKix47o3fp//vKuF7tiwqcwjT4qUxlA9BD5r2HP\n KLvszmmXg8N9M8e6javwoWsb0a0vEz/Z55vcSMiyBif/DzrR3+/zZQoua+Hrdc3rV59C\n +HlqWrelZAw+NCzOzG8JFJIfyJAHUSZGWYmhRoleTn3fiHcSOfZAPtAkZ1WL3pbHO2+T\n 4RVQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775058014; x=1775662814;\n h=content-transfer-encoding:in-reply-to:content-language:references\n :cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg\n :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=0jrxGx58v/Lvi1lkS4mNHufc0MVkUf0Pc3D8JTx95tM=;\n b=npaArMgQgyjstdDV3m4PemmdKhtboAGqIQzLRqRkD2aULLLKwnQ6bHyxGsMxcMGLDy\n Za63Rm0j1eykAvn37H2A0cC9OHhqOjMgUQo1fTRmRQzzKpE5QcNRXvfPUJyI9e56Mm/V\n lsTxPigY9tFRO9k4WEfKy8YL3wDWGW0IPlDWPXrHw3yTk4Gev9Tuv9tDGDHa5dyXaG/4\n MD/zSLajQsyVFVCVhNAygWEK9K3ezdaKHJdpQfJhN+SuMy9vRJRRGLanLLwHNXRApKzt\n LL9ZneHFpBmF8hquKZzeeqgP+ESsfiXEegHqWjsluOxQ1e3JEDQC4hB2AT66YIwvnDK7\n XJLQ==","X-Gm-Message-State":"AOJu0YxfrrEPhNmosPNipAG4mS9b9GSme9wT7ninKtKa0TNfUW2gAQBn\n z9n4bmrehSU5d9p2WXKdA5HD399BdxexjoNFZvgygC4w1a/k1yFRyGgO+1Sv2RPACPC9eN1YH7U\n 5V3gEfAE=","X-Gm-Gg":"ATEYQzxvDIDpRp5+Wc8ja9YwpyHaMVeekzQSeDSh2Olo9MuW6K6ISN9ra2eEceBL5mJ\n JerlNAcMdfzs2Ze0sx6vKszvlMDCcseTeQsax0kgH1MdDp1oopgRgaFXE647CxJtAr9STXpX3+V\n s77EJGWVyDGeMTXvSVaSaMic21XFgrjQy0uzWtFns+Wg577KYiWzhwCdQCYMGNGI42zUj64o6zq\n ZsIu1w0UaGlYK56rmUCyVyEa7+/uGicXAMI1vE8HKFW3fBILQ5YDW0hUNoZ3PUYBPKLJNB/T+15\n SZm7UD5FWE7Y2NH7BQSR+AzfDPbTWJM9U1CQCpbGft/BGAHlLFi1GGq/rJRDJ8rzb7GLsYxbPoE\n vg12YJra0+yumLH54pJQK8mAWmadKpnlA2WLeWT05Em9t3WAIID91y89JU8sLB4imQAcQVs2vmy\n 3JGe1y0NikxPo+PS5JhjJWlEBvduZ4t0n77TZIFErOiCyf8SSA7HHUnuXe9GaKbNjFD5BBERn2l\n adLijHmoETJVko=","X-Received":"by 2002:a05:600c:6211:b0:485:3c2e:60d5 with SMTP id\n 5b1f17b1804b1-4888356611bmr70103045e9.2.1775058014093;\n Wed, 01 Apr 2026 08:40:14 -0700 (PDT)","Message-ID":"<86a71314-1a1e-4af2-bf6c-351faeba0a58@baylibre.com>","Date":"Wed, 1 Apr 2026 16:40:12 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] libgomp, nvptx: remove erroneous stack deletion","From":"Andrew Stubbs <ams@baylibre.com>","To":"gcc-patches@gcc.gnu.org","Cc":"tschwinge@baylibre.com","References":"<20260324133551.2332702-1-ams@baylibre.com>","Content-Language":"en-US","In-Reply-To":"<20260324133551.2332702-1-ams@baylibre.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}}]