Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4266747imm; Wed, 30 May 2018 02:15:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIYoBbpbTo/TXDcKX0xWxtedbpC2Q8f/qiYoe5SVOOVMQ/rCj2WnFSJL9BPyvdjOEm5JpQM X-Received: by 2002:a63:6f83:: with SMTP id k125-v6mr1608167pgc.63.1527671741591; Wed, 30 May 2018 02:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527671741; cv=none; d=google.com; s=arc-20160816; b=xp1BgJzppgKf0NloovClRLIXMdAQk23Pz4bTwpEv21xSMjRP1tibh56YeoxOxInF6M bTkYiABTZQWVtnKQk3cbyvPcsVfBn8ooy/I9yW2DdexustxhBDhIJHREIhyQf0xgp1UQ VP1+bHggeC3b0zCNULIC+zFwNlgpwIPiL5EA91l71yUkeTanuZ2TIa2j0JLuYjUPmcmm Nm+4AVGVhdwr85Stjxs19QH1+HBURYurv9ENXEVYjNCMDESnTkJXtE5GG7/8QfjcmMok S6UR/0Padbl6ZDbt7VVpv4PNJizjKH6s+jPiRkxzIiFa+REYBWtQN8C6+tHlJmU0C3y9 YuUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Y21vk9keEFs0XSr2Yo2WmZLvE33Wk6uw4K3wjtb2k2E=; b=B81IOMCbWwaPE47O0REMACdJy1GP8DJuWpmc9/xiJpyePMeRB2DTaNbyzSlLasydQn Bw/+fjviIfOzQHOt1PDFLJKgvsPGI+aJuCtjyP4PEfJifyogXK8oyRSjgTxIeVL4oovO mNdeRWdxgVCfYqQJPlISr18NSfYMMcybFiVDEHm1ZZ78PNe9AWwIMf9M0bfLvSx3LXwg Zb3IYfmEk2/R8i0ABYueSaUnPxZR8khBuzH14BVzFJ/FoxKQKlXA7CYHuor4OrVOiOtW zpbzzVl6WH990kDStGEMpW8f4GCZBrXGPHOln22kPhQ1fZlJ0tAxxlDjH6BwPYP4eORF DR9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QC42DtfX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si27181543pgf.364.2018.05.30.02.15.27; Wed, 30 May 2018 02:15:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QC42DtfX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968795AbeE3JNI (ORCPT + 99 others); Wed, 30 May 2018 05:13:08 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:44994 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964877AbeE3JND (ORCPT ); Wed, 30 May 2018 05:13:03 -0400 Received: by mail-wr0-f181.google.com with SMTP id y15-v6so28722429wrg.11; Wed, 30 May 2018 02:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y21vk9keEFs0XSr2Yo2WmZLvE33Wk6uw4K3wjtb2k2E=; b=QC42DtfXM7uWjS6uLReACBWRjOMxSGJ5Cou5eGr00VvYnftvgRQ6KMN2D91fmOa6KN 9MSy9RiCaFJaOuz3lx+zhAd/P13lEVFVI3KK98XAlMLrjpRmGdhQ7Ym1CJ9nqYCa+iSX ZLGiZNZyYpJeBxgJVepWUeHLJ8fMOr3QZmb2I3OArLVWADA7ikFNwjHDg78oQDqg1qbw hp6oaEqlskmOWLRZX+Jyolv8SBoOjHJreENtO+0OirEdzPF7D9NIfLFJJ/klSeqtoxEw VU4Bz2AVyd1CI5PALFaNL1mqd9EhJRPzpfXTCIDHsjPoc9UnkcCCFy8MhPToVB6fbKOF DSLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y21vk9keEFs0XSr2Yo2WmZLvE33Wk6uw4K3wjtb2k2E=; b=Sdziv9vjFRIsHFg3af+Ki5IWMclR3KFgh43+ui93BNT8CgmOWui/G6EXWlZk0hkY0Q FYwnIgoqZzlXrqHgC/YTcm7/yTMaY1T1gvJBdNDJSFM8xMtF2OM3mARw1B3kydp5NWLE wBLSN425f5DKTwRdb2Uq7abj1zZ7JEnlZ1IzaZ278ODCAQGTgIPR1C3kR8OsSDfaORlK tD/2LdWMCxpkjXXoafeDvlL6XxNqPjvat5VvEjNIPh5joFjYRTnQED0VAj1ovtdin9vG oZFSiJaLwT4Fdy4NirW63R0zmdAFTUWuxRxW3hONq57TKHkjR2ah9539LRjww/F5F0z2 OYUQ== X-Gm-Message-State: ALKqPwfpblH2ecH7YqbC3cR3fehhPofN0oQVthTI+ZBjo80MUEWNaS2f vlqeQURE3LzoMJmaEazKdLz5N22hiKCiwWSRAe36Ag== X-Received: by 2002:adf:e542:: with SMTP id z2-v6mr1443479wrm.111.1527671581968; Wed, 30 May 2018 02:13:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:97c5:0:0:0:0:0 with HTTP; Wed, 30 May 2018 02:13:00 -0700 (PDT) In-Reply-To: References: <1527000509-2619-1-git-send-email-jianchao.w.wang@oracle.com> <20180522200214.GF9536@vader> From: Ming Lei Date: Wed, 30 May 2018 17:13:00 +0800 Message-ID: Subject: Re: [PATCH] block: kyber: make kyber more friendly with merging To: "jianchao.wang" Cc: Omar Sandoval , Jens Axboe , linux-block , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 4:36 PM, jianchao.wang wrote: > Hi ming > > Thanks for your kindly response. > > On 05/30/2018 04:22 PM, Ming Lei wrote: >>>> you could keep the software queues as-is but add our own version of >>>> flush_busy_ctxs() that only removes requests of the domain that we want. >>>> If one domain gets backed up, that might get messy with long iterations, >>>> though. >>> Yes, I also considered this approach :) >>> But the long iterations on every ctx->rq_list looks really inefficient. >> Right, this list can be quite long if dispatch token is used up. >> >> You might try to introduce per-domain list into ctx directly, then 'none' >> may benefit from this change too since bio merge should be done >> on the per-domain list actually. > > Yes, it maybe good for merging of 'none', because the rq_list is split into 3 > lists, and not need to iterate the whole rq_list any more. > But what's about the dispatch when there is no io scheduler. blk_mq_flush_busy_ctxs() and blk_mq_dequeue_from_ctx() should work fine in case of 'none' if per-domain list is added to ctx. Then we can make none to be a bit fair on READ/WRITE. > We will dispatch request from ctx one by one at the moment. > If we have per-domain list in ctx, we have to introduce some policies to determine > which domain to dispatch, and these policies should be in io scheduler actually. The policy is done by IO scheduler, and you can just pick up request from ctx/domain list easily by introducing one blk-mq core API. Thanks, Ming Lei