Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4569880imm; Wed, 30 May 2018 08:01:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJm/vdfG5ANd6il56ZxoMJAChldapEWgKLtgeyytAaGzuYO17V+/8ypTs244WZI36s5T2Qv X-Received: by 2002:a65:5002:: with SMTP id f2-v6mr2470677pgo.38.1527692479804; Wed, 30 May 2018 08:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527692479; cv=none; d=google.com; s=arc-20160816; b=efmjVzqByxwQZll3J/exITmbYweBhP8TvD3v06HI7gJwQzJos0SzgkhUnju47KA9mn 58yVsig2Fd2lsUsWKRYay3GhW/HeutVExCP5ucPALIxaWKHOU2BZoHKhR15oOm9C9CH1 KXqgWo/REkdQHwTkzYtmVCa1QBWEM8RYLXE+l7DJDlM1271j2zj6vnVWME1MKU1H8n9F wz/XGZbxwvpY6rce8IwToIXL3jHQ27Wk9BJU7HJTyDRa/z9Rgbq1RIUOl/XJctxCfSUm YOzFaIY2gOsymAit/WxHjGPUg1mozSP2rlREzFHWqKgvSoPXW1dc9Ak3PeE7vjwggq7s uuoA== 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=+y79wG47Dnkw0OGXhTdU7WXqJptrxYNNUiCJHcYnVRM=; b=M1Cn7/3bi5KIoz0grGXkoLV7tfHI86MgT9rzkr9IXj0AGdwQte/FjkYcqzoGxBdLG2 M8OchVJ3iEBHWe2xcvkt3Uj0AoE39AIJz46Eu5APnapXrUfcaSl7F3zOxH6ZcGrF9Hmm MBXDD/jPCH+Y+Nab+ulFKUOwLB5PYXEHFD9bUUY4jtaRFDOieUsT19JipgI7LnfeNzcf EstX9zSZdftHQ1hd29ebFBtgBgI3/tTeF8RVK0hBr23lsrns5pCg+tD81RSn7BvhLkKk r0pzXeSmJlQcuqZ1Q/B9lBXdJp5c/mK7jU7U571hWY9MSU3qq2fRhVTDFYV5tIflrQc+ Z8BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=uqCSD2Mu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si33895811plw.299.2018.05.30.08.00.55; Wed, 30 May 2018 08:01:19 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=uqCSD2Mu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753592AbeE3O7E (ORCPT + 99 others); Wed, 30 May 2018 10:59:04 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:44913 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbeE3O7C (ORCPT ); Wed, 30 May 2018 10:59:02 -0400 Received: by mail-pl0-f65.google.com with SMTP id z9-v6so7905343plk.11 for ; Wed, 30 May 2018 07:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+y79wG47Dnkw0OGXhTdU7WXqJptrxYNNUiCJHcYnVRM=; b=uqCSD2Mupoz1xrmR+X7k6AIukZ6uZCVbyqm577DOa1bJuhbcQ0TirGcMXhImJuxJjy XiI+jAYHioNYnaFNc/5uG+e/J3lbhg0hXJM+hNuxNMLmOzZFOvqREfUAfXZuiiLx46tg w9cXyllE0u5YDO7MdnPRpOueuM7CG6dVX0nNE8WIafMllGjvVmvi1ncHOqw8Qbc0BBQg 6cmMDBefQn7dy/quu8j1sPj+JvpE6FvHQJAXRfUDPW95feKAhfX+47zRxCxvujWiZ+HM JmFEvbWlADcScWTqt9iO2CknT+ncm2KvVaHef0KuxtolncE84P+41+Dm1aqsraWH4n99 O1Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+y79wG47Dnkw0OGXhTdU7WXqJptrxYNNUiCJHcYnVRM=; b=AiCtQgNPXoniN3+O/8/UFAhzS6oM1QhRKeonqA3P4OP10Garooz1boiqBHh6gYBt13 VudXxotFtBPf/5qIh1SOJ/LM+MVGHM6NZxE48avmht6GGikLSKXkEAiIZteHTHnDJvPk Ebc5pcscdI5whvopBHkvhmL9IZhWzPqpsfv3PailCvPCp51500zSoSovxh8FH9/s6U/p aQgsrgzYCc4PQsNc8beo/Nw8KOdGg7QaKOnb8P4f39z9ARkaF1TIFL5U4wNkZtMpEuHY 4exsuDBTIWwM6/SjA6rZ3BqRnVxqp/9D0U5vqrZLjJri3ELp6oEoN/Kqq9TrZP46CG4z L3bw== X-Gm-Message-State: ALKqPwe+iO0QKMX7F+ude+Vc3xX9z3PXSojNb/cIRx2Tjw0I1z5WuqnI TfdIjl2a/X5f1UqK5SOWx8Mhv+5Vlg0= X-Received: by 2002:a17:902:b683:: with SMTP id c3-v6mr3186877pls.158.1527692340836; Wed, 30 May 2018 07:59:00 -0700 (PDT) Received: from ?IPv6:2620:10d:c081:1131::110d? ([2620:10d:c090:180::1:53fc]) by smtp.gmail.com with ESMTPSA id o4-v6sm75164666pfg.129.2018.05.30.07.58.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 07:58:59 -0700 (PDT) Subject: Re: [PATCH] block: kyber: make kyber more friendly with merging To: "jianchao.wang" , Ming Lei Cc: Omar Sandoval , 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: Jens Axboe Message-ID: <1212b1b8-d901-f2ab-25a6-9d42b08c680a@kernel.dk> Date: Wed, 30 May 2018 08:58:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/18 8:55 AM, jianchao.wang wrote: > 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 ? That is indeed the point, we're not going to introducing further logic or merging to 'none'. With that comes various other heuristics, like being discussed here, and that takes it even further away from the light weight and non-intrusive nature of it. -- Jens Axboe