Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2286301imc; Tue, 12 Mar 2019 10:36:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuMnDtb2P+3jyWTTTnfutxDVFjE7IsQIq/oN27ca731oqZHf9oXKvKtI542zbgh1p3YJ/j X-Received: by 2002:a17:902:e70b:: with SMTP id co11mr18116552plb.102.1552412185648; Tue, 12 Mar 2019 10:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412185; cv=none; d=google.com; s=arc-20160816; b=TG+6A9auKnQc6VTf3m9RBi2fIDzpIpgdwSIlBsudOWjz+79ECcXzwdFCiqZ2mXYn8H i6BCleCNKEO8A0D7c8LwtE2ceOyQI0HfYWALhcF8Ba7zZBlaOnkYlnPnOVsxZZ++6s/k WMKRoQmSvvkzSV4rXPC5smvDhXveHFoQYNMSSAbukIZU29vOkGZ//f9NwQ8FwCifChac GyyK4WqOu58jXU2lDChFQ6fGZ02uG4Zep+/v2OJrXa7IqEiftQxB/B46ckFAxfO3Q7wC iuh6kOAJJBdA+Eu1wyIKPQvSdR+Z1V4XOV5KGadR8phrnX2WC69eix+aMPloi/DitZ01 N5vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=X6N5zivr7b9gV8h5d34MOFPVTMuRPmnipcPRFxSXQug=; b=Obp6sNUodfMheqzfSsRoi+hjFNZNT8hjZe58d721i1Rp46MdeW0MMAzzJB7NzFb4+z j9BRRu1V1/KAE50H/DM9yyZJdxZjPH27/2nj32ToPv23l51SClCABg5Q+EKlcx6ot2ob mrMcEP/3CrPTcTWEA/HaVdhA3Vhyu2d2ISsByzSWgw8PYcYZ+HW0ZAyC7KYWtHhWSoc7 WUNgGYW/jc+r1X0S+UFfKiEuwmKRfS1TvgIc5ea4qS4NbHEdOL0P5cZOmkOHzp/9Btdr C3T7TRK0bvcRUKWluUZ46LK9ezXTietkPv515YlVXYHqn16qT/KF/FKLy8naY+EJx1yP lG4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=CbkznmpH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si8100297pgd.52.2019.03.12.10.36.09; Tue, 12 Mar 2019 10:36:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=CbkznmpH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729637AbfCLRd4 (ORCPT + 99 others); Tue, 12 Mar 2019 13:33:56 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39052 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728332AbfCLRdz (ORCPT ); Tue, 12 Mar 2019 13:33:55 -0400 Received: by mail-lf1-f67.google.com with SMTP id m13so2730643lfb.6 for ; Tue, 12 Mar 2019 10:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X6N5zivr7b9gV8h5d34MOFPVTMuRPmnipcPRFxSXQug=; b=CbkznmpHO9VH3IoEYzc2KVudPHFJ4bUScT313B+pCUFJ3EiIUanjbd3NvMrdaMIkpO QfmPu4/OcYuh4CJarONkw1yrIYmVamTAeb4z7by5l/6cumtPZAs2BCrRSh9KQz+wtdjX JgMnxY+JjfaamSzyflk2S6242YV+xfozJDqnc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X6N5zivr7b9gV8h5d34MOFPVTMuRPmnipcPRFxSXQug=; b=HzIX3VOOTnRhsqrZEJxbZ0HMeefg9RswRY/jMtQ0Kqz1aTL8/aP8FhispuFOPLc7pY Wz8sPW3f23FO06K+Smz8YgOJLUTxxTOUJTNNYEg3NHzmOSreOLabYsFzSSBgj3MJR0PR 77W60C1KCVKiNiqrKyl0iVTLbRMEXF8pDaiIWAwfTF7r+8WIT7t6AK2bamoY+Djjqiqh rmfeAsZ2ubyh/8solPkPQwXZhcIbEn2y8CLn6KCeITBZDsxlhuKv+VKj97oDbEv07V1o 3e69rva0Ts6RHpviidYbofzxfDdNDG/yQxXGVoZfLlnf/vdJmKIaYtTu50SaLUi0O6p5 Rq1A== X-Gm-Message-State: APjAAAUXIy3Mi/YxBqkDpKj/bsZqeYzNlOR45z539pyRGprNe9gnYxFr 6c/yGiYXTpnadk20ksMiJ9LbFw== X-Received: by 2002:a19:4f06:: with SMTP id d6mr9792039lfb.125.1552412032748; Tue, 12 Mar 2019 10:33:52 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id j5sm1473609ljg.47.2019.03.12.10.33.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 10:33:51 -0700 (PDT) From: Rasmus Villemoes To: Marc Zyngier , linux-kernel@vger.kernel.org Cc: Rasmus Villemoes , stable@vger.kernel.org Subject: [PATCH 0/4] irqchip/gic-v3-its: free_lpi_range tweaks Date: Tue, 12 Mar 2019 18:33:45 +0100 Message-Id: <20190312173350.4025-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I noticed that the O(n log n) behaviour of free_lpi_range could easily be made O(n) (patch 4), though I don't suppose n is ever large enough to actually matter. While there, I also stumbled on two other micro-optimizations (2 and 3). Then while writing the commit log for the last patch, I noticed that the cmp callback I was removing was actually buggy, so I went back and added a patch in front suitable for -stable. I'll leave it to others to decide if it's important enough for that. Please note that this is only compile-tested. Rasmus Villemoes (4): irqchip/gic-v3-its: fix comparison logic in lpi_range_cmp irqchip/gic-v3-its: move allocation outside mutex irqchip/gic-v3-its: drop redundant initialization in mk_lpi_range irqchip/gic-v3-its: make free_lpi_range a little cheaper drivers/irqchip/irq-gic-v3-its.c | 75 +++++++++++++++----------------- 1 file changed, 36 insertions(+), 39 deletions(-) -- 2.20.1