Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2895053rwd; Mon, 29 May 2023 02:31:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4uVqCqAbIsgrVPe9pHWRoEbsSm0AlkaBs6nYrwvw9UpbF51VbucgFG2RuUEIpQ/znAbNWg X-Received: by 2002:a17:90a:bc42:b0:255:e301:7b01 with SMTP id t2-20020a17090abc4200b00255e3017b01mr8682619pjv.35.1685352682611; Mon, 29 May 2023 02:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685352682; cv=none; d=google.com; s=arc-20160816; b=H6wDhQYJjL9qYTzrH9eilP2pR8oDzQrZEO1wnD7VP+iMn4kAI1dPvxIfIf1UB3jQdV /wVvcy994b/nDCiU3tuQvUDG4UTxNAqhYDTNo1pLO9mwIr83eHEGR+3i2ei7eHJoeM0o 690vZFtvHDon9IbEZIT8mDHxHqAiMV/a4BlLG6E8+yok8FWSYFDRTTIFbbyMHmp85foo NIJiNQMHu8w/Cc8H5HurK26ezhdfRc8Wpk3SoGD+D3Eqav+HKwdoNaOJgGDWSkmH0d11 4lJfGD1hZp5TqS8bJ8iwRPnLzG6PAVw4ulMaOci4TFcvESDU/CCpf0PqhbWBCesNT6XC ad8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=L9oP66CShv0wsXW7Wvc+5XvMH74LdvQ2kHTVempZbao=; b=SXqlfT4ZUs39UzvtWFgb8692hp0tCof2yfjHb302td3tGX2YwkyY5jewPSgwRI1/6V VG/3Oo1XhRpO4IeDCqqg4KxAo847IjvQvnKPBOg7yDA+LkChAcS+0Z4UoGykzsN11ZdM 1t5MkUUnBDJM7Hx8OxXw0AgxgkHNUNGPWh4xJ+BpDS25lQDJaVE+kG4VXk3nRgMFx6iM yPmkfGDORs2Ha//1miYRV3ku7OEPsJM/WcIHDm+7nip3pCuEadzT72tGrY/6iHMKurWy FqVXJxEUKwU7M0UvSLcK4RW9oIQyxHpxJT1OUZZQzD+tpqjtjnmE3LaU7HYRzA9TY5ak NFzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0fMICRZa; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg15-20020a17090b300f00b002567ea157e6si1516042pjb.136.2023.05.29.02.31.09; Mon, 29 May 2023 02:31:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0fMICRZa; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbjE2J1g (ORCPT + 99 others); Mon, 29 May 2023 05:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjE2J1e (ORCPT ); Mon, 29 May 2023 05:27:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A3AAC for ; Mon, 29 May 2023 02:27:33 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685352450; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9oP66CShv0wsXW7Wvc+5XvMH74LdvQ2kHTVempZbao=; b=0fMICRZaJTgn5JAKL78GogJ/1jaAH+tUacjala8qMFTXYwjhGgcUhArVgS9F7E38KOeTBV RVF+5HoUDDgpFJ/3VmomkAqCAt+vTMC/sNoQ3YggQKnjaypDBeXdsDjs6zr0RqU+hmkHne ApyMCzYEDKfkYCOLFW+Q1rnXLxgR45ESmMjUhEMzx97INL2mom02nBbHRjzHnzcVNgs0rj +J/ZTy7M2ZDWfUtVpv2hZUrDFSqbm7mwQzL60XNuJECwbTnplAwhNtWsdLRiaKVDG5VCyc w0ngIbsHyRFimSn8b0nayjhL7y/PuKBKfYlxOZNvzQ/EhaUSvjB1BuDEI0d4Ew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685352450; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9oP66CShv0wsXW7Wvc+5XvMH74LdvQ2kHTVempZbao=; b=nX8V5aF/Xav4vH1QPSThVgfc/HoGNPiEvTWUlRqDnfEQGdOwrpFy+PQc/rgeC45js5pLkm QqPI04hgot9PYaAQ== To: Huacai Chen , Marc Zyngier Cc: Huacai Chen , Bjorn Helgaas , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Xuefeng Li , Jiaxun Yang Subject: Re: [PATCH 1/2] genirq/msi, platform-msi: Adjust return value of msi_domain_prepare_irqs() In-Reply-To: References: <20230527054633.704916-1-chenhuacai@loongson.cn> <20230527054633.704916-2-chenhuacai@loongson.cn> <87pm6llvm6.ffs@tglx> <86fs7gdhid.wl-maz@kernel.org> Date: Mon, 29 May 2023 11:27:29 +0200 Message-ID: <87ilcblc72.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 28 2023 at 20:07, Huacai Chen wrote: > On Sun, May 28, 2023 at 3:47=E2=80=AFPM Marc Zyngier wro= te: >> >> Being able to allocate MSIs is not a guarantee, and is always >> opportunistic. If some drivers badly fail because the they don't get >> the number of MSIs they need, then they need fixing. > > Yes, I know allocating MSIs is not a guarantee, and most existing > drivers will fallback to use legacy irqs when failed. However, as I > replied in an early mail, we want to do some proactive throttling in > the loongson-pch-msi irqchip driver, rather than consume msi vectors > aggressively. For example, if we have two NICs, we want both of them > to get 32 msi vectors; not one exhaust all available vectors, and the > other fallback to use legacy irq. By default you allow up to 256 interrupts to be allocated, right? So to prevent vector exhaustion, the admin needs to reboot the machine and set a command line parameter to limit this, right? As that parameter is not documented the admin is going to dice a number. That's impractical and just a horrible bandaid. Thanks, tglx