Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1678175ybl; Sat, 7 Dec 2019 00:05:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzwgrq+Eundrj2d9bdNSUQobKcLaJaXhrOXkzkQbnwQu0UbG9ZjBAdygnyWLqofhVxwJjCR X-Received: by 2002:a05:6808:618:: with SMTP id y24mr15535556oih.86.1575705904548; Sat, 07 Dec 2019 00:05:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575705904; cv=none; d=google.com; s=arc-20160816; b=Avkp2bLooaBNx6LCsDjJB8J9Me7vcaqoYK9vrgCT2KeAme+YnXwHnzzTZ96vJmDUuQ TqMEQ7K0dyOJ5s0jP4v8VQjJSXN/Ol3bMW0sL0cepowSLxNhjyixEwSMHAFIZQdQEmb4 g3fZ6ANkskX7fgGcMUZAVUMgRU9fLs3MHajmieORvbrBdMRihObOXPMjY8PZs2U3x/Xx rs0n3AG23TqLuhMptblFevApJU39LV51q41GaAwdUFwURSoWMZYhOSXt9butRxFwTFi0 D1LTDA6N0WYW1UXtB6K/MGryjYV6KqAbGkIlT/dURNi5eY6783UGFlRXuK9e2OqTJPHM CBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vliPqnCEhaC7aRJFwTK4kmONvLe/uovKYwo4EW/vES0=; b=GeCUKBCIKamRHjuvj8YPdFf/EXnXXUc1gHCnnTchjUepg+k6zNWLewYu8eBThpFp5O GaPb55/hkdo+tfOQ8NlcKB4aXNhcBX2a4m6fGEYVPAjux6DJCNtueY8MCuDiENL5mxfE 7eFqlgy9GBnRwCSCDrd+G/rsZn09SEqMVzdjFSbnpAYkidA0akFjmUGhy/M6WHDSCh9z czJxIT6e6HR4f8fMS4A8UvbA3TFGqliRexLMoL7TM1V9DONugvR5SU+0dy1mPzGABkOU eDwwen/zerYn3aOjlzs+FZ6x3yhJ7w0z+I4VmwQ9jYZedG9BTGJ3HxJfmVu6V2/ZRbaX KRgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XuzGvB7e; 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=pass (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 v25si7548886oth.136.2019.12.07.00.04.51; Sat, 07 Dec 2019 00:05:04 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=XuzGvB7e; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726483AbfLGID7 (ORCPT + 99 others); Sat, 7 Dec 2019 03:03:59 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20804 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725976AbfLGID7 (ORCPT ); Sat, 7 Dec 2019 03:03:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575705838; 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=vliPqnCEhaC7aRJFwTK4kmONvLe/uovKYwo4EW/vES0=; b=XuzGvB7eQTn5BVsGU3f1RxGyM/BSv/4dNCPQaTjNUaQ7Fpx+yC6k+nxAVkcKEFpIJeORCg suRv+MNlViaueFe44A5FrdmuZ2HlEqnH7h199ezzUjHZbMpnA7hihJBlYHwcIXpf9Z9DuE 5sn6StaYZlhGldLeNhID4JNx29lXRS8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-e3lQR1x2NYGHNHG0AZGL-g-1; Sat, 07 Dec 2019 03:03:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BAB61005502; Sat, 7 Dec 2019 08:03:52 +0000 (UTC) Received: from ming.t460p (ovpn-8-19.pek2.redhat.com [10.72.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5DAB5D9CA; Sat, 7 Dec 2019 08:03:40 +0000 (UTC) Date: Sat, 7 Dec 2019 16:03:35 +0800 From: Ming Lei To: John Garry Cc: tglx@linutronix.de, chenxiang66@hisilicon.com, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, maz@kernel.org, hare@suse.com, hch@lst.de, axboe@kernel.dk, bvanassche@acm.org, peterz@infradead.org, mingo@redhat.com Subject: Re: [PATCH RFC 1/1] genirq: Make threaded handler use irq affinity for managed interrupt Message-ID: <20191207080335.GA6077@ming.t460p> References: <1575642904-58295-1-git-send-email-john.garry@huawei.com> <1575642904-58295-2-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 In-Reply-To: <1575642904-58295-2-git-send-email-john.garry@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: e3lQR1x2NYGHNHG0AZGL-g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 06, 2019 at 10:35:04PM +0800, John Garry wrote: > Currently the cpu allowed mask for the threaded part of a threaded irq > handler will be set to the effective affinity of the hard irq. >=20 > Typically the effective affinity of the hard irq will be for a single cpu= . As such, > the threaded handler would always run on the same cpu as the hard irq. >=20 > We have seen scenarios in high data-rate throughput testing that the cpu > handling the interrupt can be totally saturated handling both the hard > interrupt and threaded handler parts, limiting throughput. Frankly speaking, I never observed that single CPU is saturated by one stor= age completion queue's interrupt load. Because CPU is still much quicker than current storage device.=20 If there are more drives, one CPU won't handle more than one queue(drive)'s interrupt if (nr_drive * nr_hw_queues) < nr_cpu_cores. So could you describe your case in a bit detail? Then we can confirm if this change is really needed. >=20 > For when the interrupt is managed, allow the threaded part to run on all > cpus in the irq affinity mask. I remembered that performance drop is observed by this approach in some test. Thanks,=20 Ming