Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4565205imm; Wed, 30 May 2018 07:57:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQbHLTnHlEMDt/jBLeLyiHgH1qhHF/13p1Z9IEOE0CFXOaA9Tw2aSz+aBeNriNHQDydw41 X-Received: by 2002:a17:902:bccc:: with SMTP id o12-v6mr3210080pls.56.1527692223790; Wed, 30 May 2018 07:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527692223; cv=none; d=google.com; s=arc-20160816; b=F4d6pYka7crhgNsMIKSeDZGB6txVpX97UW89Soy/QAYGvsqucWIJKIWzZr+TqyYeg+ samliZOrq+DvxGM1hi7/I42dVWOoVsS/ry9xlGo7L5aGhsYLeV0R3uRNjPkrxqmLa/KH 4jcLMXmqjy5EJv0ApmLXpk43LovT5H9RRs8f4HnXa5latTkE6WgFMQ1uQWsLmWhjtx0L MzQsFr41W0Sro89dSfzQQlEF6Zk8FHuTX2DAhAI0q6sD2+Enc2oTKA2yMK+xntNXsGoS FjOC5fnDUVv8WujqDizJeR5ylRaNdnmcKZoAwB4xnyoJFNRjK/Hh+TptM4xCYBunPP5S mr5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=IGmJnCcQ2D8JYVEhE95l6lMaSWZhyYPPwLmniHxzsqs=; b=uO5ljIFADjGrULeG0QIcDYhtTaOx0d7PFdoyGr98Q6w1OVf7FYxDcw3RM4C4dPaORx wipTERsfd4t5L4/rjBGPvu4eA7JRc2SLPmFFzCKoSi4vH4MrK+Y3a9UEsCP/Q4CJs1WB GHXspcW+MxYSVnw4V4/EIuRRsrQk73D+meIDZ6x4jPVmLFdbMqXbgG8QwF5pTUjSQjt1 sUs+PbJbJdekmJsZJ+PSmdgTLb+cCR4+cFAnNwDbWtVGsSFIXRl+Ky8JSNqWWoZtVqsP TCY11ll+c59u2AsIJAA1z/4yDSHlVn8adz1bVUAVRGmK0UH+6Hn5dtwBc0TyXIPKDd6v MjVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=MHwuGSzc; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7-v6si27417557pgv.658.2018.05.30.07.56.49; Wed, 30 May 2018 07:57:03 -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=@oracle.com header.s=corp-2017-10-26 header.b=MHwuGSzc; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753533AbeE3O4I (ORCPT + 99 others); Wed, 30 May 2018 10:56:08 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:59070 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914AbeE3O4G (ORCPT ); Wed, 30 May 2018 10:56:06 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4UEoUKw056667; Wed, 30 May 2018 14:56:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=IGmJnCcQ2D8JYVEhE95l6lMaSWZhyYPPwLmniHxzsqs=; b=MHwuGSzcCLk6Je9GD4ioZGBIcGwSEzgxsZ+o/3otTre+C8EPfhKWL1rAtC5fn0Bphqom bE9ZfCyC12pgYRRcJ0dF9MYXjNi5UIP9Jwbq6S9p5RHvWKLU6xd8mshk3uDbyieJj4ZZ X5WDjijEOtBgLhizbuBNBrWplaZ8II/gLowz0SBTuJ6f5XZeeE+8tryXGR32U7LPPuHC rty5E3X4rcjXeNIhIikmx1LmDz2UiFwbBk+f6L3+35F0Q4Hlo5yyqHM7gbpJwg6GH3Em PLlcA6bV0rCIr+BvbmBJ0GKS8Ag3TFIRWGgltIg/emvTfRYPLU0m2NALpemxb9KsgrH2 Ag== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2j9ev8ax4n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 May 2018 14:56:02 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4UEu2Bo013935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 May 2018 14:56:02 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4UEu1Lt020647; Wed, 30 May 2018 14:56:01 GMT Received: from [10.191.0.62] (/10.191.0.62) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 30 May 2018 07:56:01 -0700 Subject: Re: [PATCH] block: kyber: make kyber more friendly with merging To: Ming Lei Cc: Omar Sandoval , Jens Axboe , linux-block , Linux Kernel Mailing List References: <1527000509-2619-1-git-send-email-jianchao.w.wang@oracle.com> <20180522200214.GF9536@vader> <08921b9d-0f31-f31d-096f-6c4f3a1e4d4f@oracle.com> From: "jianchao.wang" Message-ID: Date: Wed, 30 May 2018 22:55:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8909 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=521 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805300165 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ming Thanks for your kindly and detailed response. :) On 05/30/2018 05:44 PM, Ming Lei wrote: > On Wed, May 30, 2018 at 5:20 PM, jianchao.wang > wrote: >> Hi ming >> >> On 05/30/2018 05:13 PM, Ming Lei wrote: >>>> 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. >>> >> >> But how to determine when to dispatch READ, WRITE or other more, when there is no io scheduler ? >> > > For blk-mq, no io scheduler means 'none' actually, and it works like a > scheduler too, but just shares driver tags, IMO. > > Wrt. the current code of 'none', blk-mq just picks up one request from > ctx->rq_list > directly in FIFO style. If READ/WRITE lists are introduced, only > blk_mq_dequeue_from_ctx() is effected, there are several choices > left for us: > > 1) keep the FIFO style of current behaviour by using req->start_time_ns > > 2) READ/WRIRE fair style by picking up request from the lists in round-robin > order > > 3) or others > > It just will make more choices for us, :-) OK, I got the point. But is it necessary to introduce kind of dispatch policy which is more complicated than current simple FIFO style in ctx rq_list dispatching ? If we have this kind of requirement, why not introduce an io scheduler ? ITOW, shouldn't we keep the blk-mq core code as simple as possible, and put most of the policy into io scheduler ? Thanks Jianchao