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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 ED319C433E0 for ; Tue, 30 Mar 2021 06:21:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3A2F6198F for ; Tue, 30 Mar 2021 06:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230334AbhC3GUn (ORCPT ); Tue, 30 Mar 2021 02:20:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:35980 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhC3GUA (ORCPT ); Tue, 30 Mar 2021 02:20:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C13B0AD9F; Tue, 30 Mar 2021 06:19:59 +0000 (UTC) Subject: Re: [PATCH V4 04/12] block: add req flag of REQ_POLL_CTX To: Ming Lei , Jens Axboe Cc: linux-block@vger.kernel.org, Jeffle Xu , Mike Snitzer , dm-devel@redhat.com References: <20210329152622.173035-1-ming.lei@redhat.com> <20210329152622.173035-5-ming.lei@redhat.com> From: Hannes Reinecke Message-ID: <57058af9-117d-a781-5e77-835710eb76b4@suse.de> Date: Tue, 30 Mar 2021 08:19:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210329152622.173035-5-ming.lei@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 3/29/21 5:26 PM, Ming Lei wrote: > Add one req flag REQ_POLL_CTX which will be used in the following patch for > supporting bio based IO polling. > > Exactly this flag can help us to do: > > 1) request flag is cloned in bio_fast_clone(), so if we mark one FS bio > as REQ_POLL_CTX, all bios cloned from this FS bio will be marked as > REQ_POLL_CTX too. > > 2) create per-task io polling context if the bio based queue supports > polling and the submitted bio is HIPRI. Per-task io poll context will be > created during submit_bio() before marking this HIPRI bio as REQ_POLL_CTX. > Then we can avoid to create such io polling context if one cloned bio with > REQ_POLL_CTX is submitted from another kernel context. > > 3) for supporting bio based io polling, we need to poll IOs from all > underlying queues of the bio device, this way help us to recognize which > IO needs to polled in bio based style, which will be applied in > following patch. > > Reviewed-by: Jeffle Xu > Signed-off-by: Ming Lei > --- > block/blk-core.c | 28 ++++++++++++++++++++++++++-- > include/linux/blk_types.h | 4 ++++ > 2 files changed, 30 insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer