From patchwork Mon Nov 20 12:06:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 745353 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1240359wrt; Mon, 20 Nov 2023 04:08:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRbf0GuoFRjQidA4Qcz4AKVJNdUaozSX1vvmua08XeEzf0CuI7sdjQqHRlyI1pt8IRRuPh X-Received: by 2002:a05:620a:63c3:b0:774:15ad:f34c with SMTP id pw3-20020a05620a63c300b0077415adf34cmr8656910qkn.70.1700482082892; Mon, 20 Nov 2023 04:08:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700482082; cv=pass; d=google.com; s=arc-20160816; b=L5UZ8pm3BHgy+rurQ4GtKdg77P6f2yCzEgRk7qZ0hWj0c1IhqFwNYeHZ6oKojnisVg nn+5Do9utFR4PhtWR9zumrUyAeCNwHAE7aaNwjeau8B5IHl3oZzuaHZAMkpub9E/GKcZ Og7a79hLVTOHUDDYu8l+0yAj2svf0PKPCkW6TXAtpHWhYdmv/nokVUAM60d5tVKvLJ5X DIn7V3HFZnQ2BOHFkiB+dwyS/v6Wp4wYfcC9q7O/099dizXThiJ4Hs/8akBENsbKqkOX zVcBO6p8EDTjCFu5u9MdId44l0tG8girYeS7bLe6ekHyLyantr+AQY3ww+819EFXb+1l cQeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=I16GOBf1Bi7wory7Z2ms5Ul2kK5LTAVc2L2pl5S2998=; fh=98edGTG9zj/Nk59bsyQAUrc4IlBzGyUrREu3W2WgiHA=; b=RaN25G38lBf1iW7K8N6twIm0OfT3mZaAcWIogq/d6TL+QJgZmyiNDg5FgUmzb6Nz3u RABEIIewFg41r2AvmKiRQQvfleNKUuuraoLeaA7wQt04E8buyjhByHg7xhyqAAJIWvTp l10RjHDpxppwOClXYUg5AMD86G/TpY3GT/dPHHB0ckTFBl/zVu64petYS6DMhTg6dub6 4YE1EIPKIy58J37KXWjRlNINBPldLJeB/jQE7yYsfdwL1cu0ny44oFo1CZsvHaq85MZm yR785ZJ4a5ORestffrRQsq0J0+6LRyNMEADYAGLGc3nNrn7MgIVnWwp5g3Nl4Ko4wu5v 8O/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dbYtw8G8; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id i8-20020a05620a404800b00778b12a9c53si7689885qko.304.2023.11.20.04.08.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 04:08:02 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dbYtw8G8; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87AC73861844 for ; Mon, 20 Nov 2023 12:08:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 01C503858C2D for ; Mon, 20 Nov 2023 12:07:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01C503858C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01C503858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700482052; cv=none; b=wcPz6tUJM8kIEsUgRwYlmkPlr3+fjSWCxmp+bmND68Qhrtfv2NPlTnehCll/cRuq8EKiBFns7g0iQpyFeKaYi2I21e2Gc1P2468qxuloCn00L0+dHlbC3HFzCwGKwKuPCNHwsKiMDkW/9T26uii4NDI56baIJrK3d+E/2osGn+M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700482052; c=relaxed/simple; bh=HyAdyXu9G7nND+ef2Cssqg4yB4ZbKDyzHmTcCwdmzvw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=DnLR+QJl+iMcRVHad5VAG2xgrq/jEK+h7G/gjf507Asmlx3keqgLPUmFYACsUrTuk4HsnYHpMDPswRm+lMiULIG0sOKEkMd3UWWjWjb99cMidJ1AHnwJi54UnL0fqIEjTiH29cfvZlXsZp55pxFGdcYQ3K0Bdxa1D1d2uq5WWCk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c6eac9c053so12717871fa.1 for ; Mon, 20 Nov 2023 04:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700482048; x=1701086848; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=I16GOBf1Bi7wory7Z2ms5Ul2kK5LTAVc2L2pl5S2998=; b=dbYtw8G8K2fcQgcl1EPo7zEBKNIHE8MXNSKLcHbnvEHXfCr6h30fdZS8T3tUUj2fek QzRJIvkJNP8ppX0XVk/Ua792zL/duqXdigbCdO82ZKlDdxBjah0y2obmwXuFPTUXPOQu wHEFXYybkeIt/DdDKEc08zEiR1O/1JzMMFJTY+8hgNUiDFPNjPdFWxyj8KrY8G6Iphh0 B1kmaGfnbLglmEcg8uIkG49gQ1wKHv1Oik1BT4Jcaxdx0CIpM7a2EdfIYCAmmBNi9iCc 9j+sDitzZFAw+iL11JLcWHRqsH8O0lMbK6kFG/KwZk7wORuXen2stln5XUE8+d6vsywU 7e/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700482048; x=1701086848; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I16GOBf1Bi7wory7Z2ms5Ul2kK5LTAVc2L2pl5S2998=; b=PavfGkJ8y1cz5IOCQQkIFwLpb8NpDBZGVZNKJomBAPTmZ5+sMfwC0/mPvYofF661qt V+5ZbUtiT3tctilNssgY9gXfEmzr5rd3Ht7RclbH36cQh0irF72wdvLLhbflbSLX0kN1 NZ5eBTg2MY00s4CSnxWolSTtrFIsI91lGdJGyPO9YOrND+dgbJ+PyBNd+A3qYFKqUIbi ZC0qK5tl3U5ot6HTyOq0ylKnAB+4P7U+d0c0bOJgShgSviqYZWbtrI1zCLRrEbNIc9vv tOoABL45DupsyCgU9EA9kJ4OrQXKy4cKncv3Mb4tMf64JqimHbN1c0X1K4iHMF0eRgOI bR/w== X-Gm-Message-State: AOJu0Yx8Za4zVi6l7T1GckxDpqj8wYpZY60KsKWNnhJUNqA6vJZ6OJHg se0yFsTr3eGuljjPHL1m+lYH9iIIo8qJFwKcbis8cLA= X-Received: by 2002:a2e:9848:0:b0:2c5:409:7005 with SMTP id e8-20020a2e9848000000b002c504097005mr4082357ljj.4.1700482047861; Mon, 20 Nov 2023 04:07:27 -0800 (PST) Received: from localhost.localdomain (static.225.72.216.95.clients.your-server.de. [95.216.72.225]) by smtp.gmail.com with ESMTPSA id p22-20020a2ea4d6000000b002c50b040e94sm1045559ljm.85.2023.11.20.04.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 04:07:26 -0800 (PST) From: Maxim Kuvyrkov To: gcc-patches@gcc.gnu.org Cc: Maxim Kuvyrkov , Bernd Schmidt , Vladimir Makarov , Jeff Law Subject: [PATCH 0/1] Avoid exponential behavior in scheduler and better logging Date: Mon, 20 Nov 2023 12:06:48 +0000 Message-Id: <20231120120649.672893-1-maxim.kuvyrkov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patch=linaro.org@gcc.gnu.org Hi, This patch series fixes exponential behavior in scheduler's find_modifiable_mems(). This fixes PRs [1] and [2], which are compilation time and memory hogs. The first patch in the series is the actual fix (bootstrapped and regtested on aarch64-linux-gnu), and follow up patches will be improvements to scheduler's logging infrastructure, that enabled me to debug this problem. As-is, the scheduler has good logging of the actual scheduling process, but calculation of instruction dependencies has almost no logging. Please don't delay review of the PRs fix to wait for logging patches to be published, as it'll take me another week to clean them up. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96388 [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111554 Maxim Kuvyrkov (1): sched-deps.cc (find_modifiable_mems): Avoid exponential behavior gcc/sched-deps.cc | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-)