Received: by 10.213.65.68 with SMTP id h4csp2183083imn; Thu, 29 Mar 2018 20:18:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx49e2hkqZKdKn5LW03JOrte8TVhNHiQdFCkzznS8W7nA8KifHF1jTnfeXY8VMFwFWH622Z0J X-Received: by 10.98.157.157 with SMTP id a29mr8425973pfk.39.1522379908368; Thu, 29 Mar 2018 20:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522379908; cv=none; d=google.com; s=arc-20160816; b=M8NUkQea2N6/+zVKBFmum3LDFZf72/cW2I9PQ2NuwTJ/3scG3p0gI1enzqFK3wJlaq zRSbMRxgESIQCgK18/FogYGxu99td5I9/3MEBfAiYiMHxZXXkdwcjNdHCOqmgc+zBIJA nHgm0d8Klj4bdpDzKl7QcifV+aVezMDJYqjIXxICCRNV7w9BPFI85far9gZOh+SF3mU4 ncHwIYLcgrExO33F0vV05+2fmy5hdWIY91blrzOkUuu8nFzxVeMtsscJhf3UwxEX1P0B O2DtkDdBHUrNbEbBwmfSbVyfx/XS7lNQplI3hLd59bQ4Y68XMZWNVZt+e5mvanVuavce TbtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=N6u4+0nG71j2swjtQFtSyqf3XafHg9trEr46PDHP5Ww=; b=pZNMrOoVeUQ2TskuK76Dh2YJmtXzBByu4ZAH9JFHWhaXHDHmKV2Pb6RQBccq98AKvk SjwYrtEevrQK38VLFdnIye+0wVNJAixOK7GtD/P9TCLeZVXNuqVkNYaPtMZRdcnFZrvf tMdetUdcNVoZmOz6Xd/CvwSnKDJg4Uy1KY0uEnLwCVz3aIZgdyOAY8s/ErMO9mGrj9Jb /ASTa9W/N1AOjgrK53q3MKxRDi5md3wTRkAQ+hqfNBwqt1P5KN34jvkQYApMJP485zdt xWQRNAPyMe1aLnUzCY50gAWUXsYKRoyj9vvByHhkuddG1ImUpODjpLmovzQqCT7VQkib fB5w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si7058022plo.661.2018.03.29.20.18.14; Thu, 29 Mar 2018 20:18:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752879AbeC3DQi (ORCPT + 99 others); Thu, 29 Mar 2018 23:16:38 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752802AbeC3DQM (ORCPT ); Thu, 29 Mar 2018 23:16:12 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B3434023141; Fri, 30 Mar 2018 03:16:11 +0000 (UTC) Received: from ming.t460p (ovpn-12-56.pek2.redhat.com [10.72.12.56]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D2B5784442; Fri, 30 Mar 2018 03:15:59 +0000 (UTC) Date: Fri, 30 Mar 2018 11:15:56 +0800 From: Ming Lei To: Thomas Gleixner Cc: Artem Bityutskiy , Jens Axboe , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Laurence Oberman Subject: Re: [PATCH V3 0/4] genirq/affinity: irq vector spread among online CPUs as far as possible Message-ID: <20180330031554.GC12412@ming.t460p> References: <20180308105358.1506-1-ming.lei@redhat.com> <1520515113.20980.31.camel@gmail.com> <20180308133440.GA2713@ming.t460p> <20180309012458.GD5228@ming.t460p> <20180309120833.GB30257@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 30 Mar 2018 03:16:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 30 Mar 2018 03:16:11 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Fri, Mar 09, 2018 at 04:08:19PM +0100, Thomas Gleixner wrote: > On Fri, 9 Mar 2018, Ming Lei wrote: > > On Fri, Mar 09, 2018 at 11:08:54AM +0100, Thomas Gleixner wrote: > > > > > So my understanding is that these irq patches are enhancements and not bug > > > > > fixes. I'll queue them for 4.17 then. > > > > > > > > Wrt. this IO hang issue, these patches shouldn't be bug fix, but they may > > > > fix performance regression[1] for some systems caused by 84676c1f21 ("genirq/affinity: > > > > assign vectors to all possible CPUs"). > > > > > > > > [1] https://marc.info/?l=linux-block&m=152050347831149&w=2 > > > > > > Hmm. The patches are rather large for urgent and evtl. backporting. Is > > > there a simpler way to address that performance issue? > > > > Not thought of a simpler solution. The problem is that number of active msix vector > > is decreased a lot by commit 84676c1f21. > > It's reduced in cases where the number of possible CPUs is way larger than > the number of online CPUs. > > Now, if you look at the number of present CPUs on such systems it's > probably the same as the number of online CPUs. > > It only differs on machines which support physical hotplug, but that's not > the normal case. Those systems are more special and less wide spread. > > So the obvious simple fix for this regression issue is to spread out the > vectors accross present CPUs and not accross possible CPUs. > > I'm not sure if there is a clear indicator whether physcial hotplug is > supported or not, but the ACPI folks (x86) and architecture maintainers > should be able to answer that question. I have a machine which says: > > smpboot: Allowing 128 CPUs, 96 hotplug CPUs > > There is definitely no way to hotplug anything on that machine and sure the > existing spread algorithm will waste vectors to no end. percpu variable may waste space too if the possible cpu number is provided not accurately from ACPI. > > Sure then there is virt, which can pretend to have a gazillion of possible > hotpluggable CPUs, but virt is an insanity on its own. Though someone might > come up with reasonable heuristics for that as well. There are also IBM s390, in which physical CPU hotplug is one normal use case. Looks not see any other solution posted out for virt, and it may cause complicated queue dependency issue by re-introducing CPU hotplug handler for blk-mq. > > Thoughts? Given this patchset doesn't have effect on normal machines without supporting physical CPU hotplug, it can fix performance regression on machines which might support physical CPU hotplug(cpu_present_mask != cpu_possible_mask) with some extra memory allocation cost. So is there any chance to make it in v4.17? Thanks, Ming