Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2342371imm; Thu, 2 Aug 2018 10:00:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeWsf/MVSgpUaDWFAaPx1ogLJ5KcVIDGe5vY69vjlNEFUpu2ugseFNh/TdxHTrEy7n8sZmB X-Received: by 2002:a65:58c8:: with SMTP id e8-v6mr285308pgu.96.1533229212287; Thu, 02 Aug 2018 10:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533229212; cv=none; d=google.com; s=arc-20160816; b=RWJBb8C7kfqWt7tdCGusoIep50c39Td+EVmTqqaWCP/yBZPXelEjesfGrTGRTczP9S u6Ce0ii5oj1HTsh2vaU9qXulCBKtBT4JWFVCq5x5p0AwpnZYZgqZ7sHanH/hdCXapVcI /DRtxgFWfG9/dZIaJf+g5Iw/CTVRf8KOMm8Wbc626iEibK5rtnNadkx6qAwWMpyY2yTX 4CCKrMZ0FGEDs/ksSx8Vk0KcE1kRL0efDNiTx+OEDmGw0V9A85x3tWz53PmQsPi+GbCI 1Q8+Ulb/G0wcK7gdxLis4vPwwm7GoN5t+fHv8hG6LICbswCrqkf0B3PXZj/orW+EkMt4 7DWQ== 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=DdhAa1mqeJnLeebSX7fUv0/hTvkujIM+F8zY4AK1NBA=; b=lRDbMXXbuGSWKtPrCuk9lPgEKn0ZXozDt92+IYSVMWP6Rx2B+snBVs0KJ7r2b+z/Ug 4ua1vCJLOEY4zJomyIPJg7A4TV1OFJiBKFJVMUahiq/lud9vC4bc1CQnFN4/1Z1PAjdD a4Nw7ZeppLLAQTYl5XoYhG7Njf6fEKHAGHxscyhvqCeT0Yvpdy4dYJ+php9M70V+7Xsc vmzIK136clibwj1fl1VVFQwPi89HUaM6PqpNcvJA39ckfaYT/u2GjIuMwf0poJfQ06tS ZSlbvrVpNpUDGgv7MKZeLFpbdnS35e3X3/8ZVXey8Aoq4gJiq8ZOYWt2StBA9P5Xgsvq mkKw== 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 h16-v6si2782243pgb.39.2018.08.02.09.59.56; Thu, 02 Aug 2018 10:00:12 -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 S1732162AbeHBSuo (ORCPT + 99 others); Thu, 2 Aug 2018 14:50:44 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726938AbeHBSuo (ORCPT ); Thu, 2 Aug 2018 14:50:44 -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 75F434075172; Thu, 2 Aug 2018 16:58:45 +0000 (UTC) Received: from ming.t460p (ovpn-12-120.pek2.redhat.com [10.72.12.120]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E523A213ED6A; Thu, 2 Aug 2018 16:58:36 +0000 (UTC) Date: Fri, 3 Aug 2018 00:58:32 +0800 From: Ming Lei To: Bart Van Assche Cc: "jianchao.w.wang@oracle.com" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "axboe@kernel.dk" Subject: Re: [RFC] blk-mq: clean up the hctx restart Message-ID: <20180802165831.GB8928@ming.t460p> References: <1533009735-2221-1-git-send-email-jianchao.w.wang@oracle.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9feaa41702ef6fcc00ce1b8aa19bbe179edf4e3f.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.7]); Thu, 02 Aug 2018 16:58:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 02 Aug 2018 16:58:45 +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 03:52:00PM +0000, Bart Van Assche wrote: > On Wed, 2018-08-01 at 16:58 +0800, Ming Lei wrote: > > On Wed, Aug 01, 2018 at 10:17:30AM +0800, jianchao.wang wrote: > > > However, due to the limits in hctx_may_queue, q_b still cannot get the > > > tags. The RR restart also will not wake up q_a. > > > This is unfair for q_a. > > > > > > When we remove RR restart fashion, at least, the q_a will be waked up by > > > the hctx restart. > > > Is this the improvement of fairness you said in driver tag allocation ? > > > > I mean the fairness is totally covered by the general tag allocation > > algorithm now, which is sort of FIFO style because of waitqueue, but RR > > restart wakes up queue in the order of request queue. > > From sbitmap.h: > > #define SBQ_WAIT_QUEUES 8 > > What do you think is the effect of your patch if more than eight LUNs are > active and the SCSI queue is full? Jens introduces multiple wait queues for scattering atomic operation on multiple counters, in theory, the way is understood easily if you just treat it as one whole queue in concept. And about the situations you mentioned, no any special as normal cases or thousands of LUNs. Just a batch of queues are waken up from one single wait queue(sbq_wait_state), and inside each wait queue, queues are handled actually in FIFO order. Or what is your expected ideal behaviour about fairness? thanks, Ming