From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC17AC433DB for ; Tue, 9 Feb 2021 03:11:55 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4115964E9D for ; Tue, 9 Feb 2021 03:11:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4115964E9D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612840314; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ESvelFJRnlm27Q4lgzc9Xw8t2qCVQ2IJGiZWl5h/clc=; b=HylGFMjxcckztRtHF5Eo/tCCaunXae3++oIVCUQt9QeiPzjuUQYM0tsWGsZKQtv/MSskJs n9nxD03cltGr0x2MGnKnk96QIa0Yjfrwo+PDPvjG43bIfY/nLkKGA2ImydOPG77qESvsRv RcMxlPh8BcvK5x6pxlj2rgY+t7niqTQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-322-MkwySOk2N9uieI5a9hR-IA-1; Mon, 08 Feb 2021 22:11:52 -0500 X-MC-Unique: MkwySOk2N9uieI5a9hR-IA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24714801962; Tue, 9 Feb 2021 03:11:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71D445C8B3; Tue, 9 Feb 2021 03:11:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6AC744E58E; Tue, 9 Feb 2021 03:11:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1193Be63013572 for ; Mon, 8 Feb 2021 22:11:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9C0935D6D7; Tue, 9 Feb 2021 03:11:40 +0000 (UTC) Received: from T590 (ovpn-13-86.pek2.redhat.com [10.72.13.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45B205D6A8; Tue, 9 Feb 2021 03:11:26 +0000 (UTC) Date: Tue, 9 Feb 2021 11:11:22 +0800 From: Ming Lei To: Jeffle Xu Message-ID: <20210209031122.GA63798@T590> References: <20210208085243.82367-1-jefflexu@linux.alibaba.com> <20210208085243.82367-10-jefflexu@linux.alibaba.com> MIME-Version: 1.0 In-Reply-To: <20210208085243.82367-10-jefflexu@linux.alibaba.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: axboe@kernel.dk, snitzer@redhat.com, caspar@linux.alibaba.com, io-uring@vger.kernel.org, linux-block@vger.kernel.org, joseph.qi@linux.alibaba.com, dm-devel@redhat.com, hch@lst.de Subject: Re: [dm-devel] [PATCH v3 09/11] dm: support IO polling for bio-based dm device X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Feb 08, 2021 at 04:52:41PM +0800, Jeffle Xu wrote: > DM will iterate and poll all polling hardware queues of all target mq > devices when polling IO for dm device. To mitigate the race introduced > by iterating all target hw queues, a per-hw-queue flag is maintained What is the per-hw-queue flag? > to indicate whether this polling hw queue currently being polled on or > not. Every polling hw queue is exclusive to one polling instance, i.e., > the polling instance will skip this polling hw queue if this hw queue > currently is being polled by another polling instance, and start > polling on the next hw queue. Not see such skip in dm_poll_one_dev() in which queue_for_each_poll_hw_ctx() is called directly for polling all POLL hctxs of the request queue, so can you explain it a bit more about this skip mechanism? Even though such skipping is implemented, not sure if good performance can be reached because hctx poll may be done in ping-pong style among several CPUs. But blk-mq hctx is supposed to have its cpu affinities. -- Ming -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16EC2C433DB for ; Tue, 9 Feb 2021 03:14:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF8E764E66 for ; Tue, 9 Feb 2021 03:14:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbhBIDOl (ORCPT ); Mon, 8 Feb 2021 22:14:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31267 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbhBIDNU (ORCPT ); Mon, 8 Feb 2021 22:13:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612840306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HLiqMW2n7YYtMYQAHHLQv7F6f639zWMgh5L7ZVOjcXI=; b=b+uDaNbJqRnTZmzsibutPX3WqgpEe4KDv8ImCUUc1Z1qTdE5qheQIjLo2EkQ/9/8J/aqNg 7P6BNOTvxtb7g5SrXwyuPg0Ev5M+CtCZfppValDA0gxb1SpHF7+XNNluBnzUQy5W7TkNLd IcViWixD17dK5u2EDZ6Sv0LbESoEVdA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-8_ei_ySOMzu40yLQ1nxtkQ-1; Mon, 08 Feb 2021 22:11:42 -0500 X-MC-Unique: 8_ei_ySOMzu40yLQ1nxtkQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DC1A107ACE4; Tue, 9 Feb 2021 03:11:40 +0000 (UTC) Received: from T590 (ovpn-13-86.pek2.redhat.com [10.72.13.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45B205D6A8; Tue, 9 Feb 2021 03:11:26 +0000 (UTC) Date: Tue, 9 Feb 2021 11:11:22 +0800 From: Ming Lei To: Jeffle Xu Cc: snitzer@redhat.com, axboe@kernel.dk, joseph.qi@linux.alibaba.com, caspar@linux.alibaba.com, hch@lst.de, linux-block@vger.kernel.org, dm-devel@redhat.com, io-uring@vger.kernel.org Subject: Re: [PATCH v3 09/11] dm: support IO polling for bio-based dm device Message-ID: <20210209031122.GA63798@T590> References: <20210208085243.82367-1-jefflexu@linux.alibaba.com> <20210208085243.82367-10-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208085243.82367-10-jefflexu@linux.alibaba.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Feb 08, 2021 at 04:52:41PM +0800, Jeffle Xu wrote: > DM will iterate and poll all polling hardware queues of all target mq > devices when polling IO for dm device. To mitigate the race introduced > by iterating all target hw queues, a per-hw-queue flag is maintained What is the per-hw-queue flag? > to indicate whether this polling hw queue currently being polled on or > not. Every polling hw queue is exclusive to one polling instance, i.e., > the polling instance will skip this polling hw queue if this hw queue > currently is being polled by another polling instance, and start > polling on the next hw queue. Not see such skip in dm_poll_one_dev() in which queue_for_each_poll_hw_ctx() is called directly for polling all POLL hctxs of the request queue, so can you explain it a bit more about this skip mechanism? Even though such skipping is implemented, not sure if good performance can be reached because hctx poll may be done in ping-pong style among several CPUs. But blk-mq hctx is supposed to have its cpu affinities. -- Ming