Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp224937imm; Thu, 2 Aug 2018 17:37:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8P2ufsiOOWJ7ZZvqGKZp6nYnq2d/z0img1UNbDE2nhF+W/+tMcBsacKmi/uTlV1YC855R X-Received: by 2002:a62:864a:: with SMTP id x71-v6mr1823883pfd.252.1533256629619; Thu, 02 Aug 2018 17:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533256629; cv=none; d=google.com; s=arc-20160816; b=U2w4hzs9aMcUupKOSu5BFcuSuk3QvMp0/D0+S6IDv6ZX4eJfuP1bPfB21y+R73TWA9 6a1OseSjIi5tImfEaR8WeQE3TTyqvndhHHM4kasU5NWR2eLlYNnBv0L0pQ7PAMhaeueb h9I7NDtUK1NRGu1wOsjRv3XA3KYoCK5l9zT9XGPEAzabogR2bi81uuwfzbKhXUgtUIo0 b0JQWM09HYm+lUAGkyn8Nm7Clfr6teGM0QljCXk23/lqlcm4VGepilMoRzRxg/bjb4Lt Zj/WSkLXWHEg3ONYwI2FyOVL0NHAWiBcUAortWZNq6udx6Z0PE3vrmcbCiDxNFh40lQe KkQA== 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=sni3kik+uPY71J8BVcru20njLdB4fPAGHXSrlR9HAdA=; b=RYQAY3KE+UawAqifqRffZJpevLzT1BXvsxa3ZIjUVX6DXhX50KtXD3MtjdMJqZWR9v L+ncVQ/HjHxf15vDiIxJoJdfnDYRg7gGdW/1W7F3GeIednPT5cuWAOPZ6RurY+RIN4NH h/pI1YXOKg7UVO73Gj9+Ew42iFwo5uTgA3c67HZkZ0Yaij4cMBzBxNPGWgnQximcBYUm sdSyO5gpZ+nIH52MyudPaM0FE8AyxHwJVDdKXrdzRZJ+YHvH6P56pLbc1gIRr8kPPh0a 8+RBTiCNcvQOkrfeLZ4bdLmmjuC0tf3froKd3vBbaKooDbgzt6AFHSFTzCHCnRRI+AZT HQlw== 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 z3-v6si2437649pln.250.2018.08.02.17.36.52; Thu, 02 Aug 2018 17:37:09 -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 S1732168AbeHCC3B (ORCPT + 99 others); Thu, 2 Aug 2018 22:29:01 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51664 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727053AbeHCC3B (ORCPT ); Thu, 2 Aug 2018 22:29:01 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A398F2B4C; Fri, 3 Aug 2018 00:35:22 +0000 (UTC) Received: from ming.t460p (ovpn-12-28.pek2.redhat.com [10.72.12.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88D41215670D; Fri, 3 Aug 2018 00:35:13 +0000 (UTC) Date: Fri, 3 Aug 2018 08:35:08 +0800 From: Ming Lei To: Bart Van Assche Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "jianchao.w.wang@oracle.com" , "axboe@kernel.dk" Subject: Re: [RFC] blk-mq: clean up the hctx restart Message-ID: <20180803003507.GE16047@ming.t460p> References: <20180731045805.GE15701@ming.t460p> <8a3383e6-2926-6858-d8f2-671f3cb9e460@oracle.com> <20180731061616.GF15701@ming.t460p> <42371198-2a4b-1062-3564-411645ffba98@oracle.com> <20180801085841.GA27962@ming.t460p> <9feaa41702ef6fcc00ce1b8aa19bbe179edf4e3f.camel@wdc.com> <20180802165831.GB8928@ming.t460p> <7c933e7e60831f985297d8cc5a540171fc921f44.camel@wdc.com> <20180802171723.GD8928@ming.t460p> <4868e0b82ac6e87aede7fc52da67d3a7913d680b.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4868e0b82ac6e87aede7fc52da67d3a7913d680b.camel@wdc.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 03 Aug 2018 00:35:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 03 Aug 2018 00:35:22 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 On Thu, Aug 02, 2018 at 05:24:15PM +0000, Bart Van Assche wrote: > On Fri, 2018-08-03 at 01:17 +0800, Ming Lei wrote: > > Not mentioning big CPU utilization is consumed unnecessarily for iterating > > over all queues even though there is only one active queue, is this fair from > > system view? > > I hope that someone will come up some day with a better solution than the > list_for_each_entry_rcu_rr() loop. But as long as such a solution has not yet > been found that loop should stay in order to preserve fair handling of large > numbers of LUNs. Again list_for_each_entry_rcu_rr() isn't fair for small number of active queue in this case, because this way decreases IOPS a lot and consumes CPU much just for checking all thousands of queues unnecessarily, even though 99% of them are idle. Thanks, Ming