Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1594785pxk; Fri, 25 Sep 2020 21:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywqN5MQnpOGzahwGL8Jr/9y580c/VexN+6s2HtABPfPaqxxEKEqB8MObSxvXIwtRT/thGr X-Received: by 2002:a17:906:fa01:: with SMTP id lo1mr6065609ejb.394.1601093357006; Fri, 25 Sep 2020 21:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601093356; cv=none; d=google.com; s=arc-20160816; b=hAEP0Q0nP5VH4NKTkoL/plktrPoRl5hcMeKvEIFmY+RMdptQgzXbSXvUTgUJueyFrX Pvm9ukEshj6qgZhhWd2YRm6IsVtNToC0XEwpdmh+Hait88Cy06ToiSSYkbDxtOTQz+E8 2wFI58wNZ5n+eIdeBOD/B05lvhgl4ctn1ZdIKnX56GTDVA7XVr6uox72Zo8T7d83aYPB TCSLPxp/v3L9cH3p9YkUSsx77+uAAgsBj71lSOqyvUVup2Dj07N/2u2umaUQwflVptyz TdTclUbs6ksAn4iJ0hVuZV2n6GFJNnZqw6wAB5joa1uV6OCxb6jZpWAjEIOdSR6+BvDN Y33w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject; bh=WVVMmOaizRCAFyknMCJGXyHul5Kj6HqFHMuAWn7Lcko=; b=MDwhE7aK4cZt/y27WcbeQ1BLAW3xO3V54Wcy77Dmvkd8DTGsCBt0Yw9lr4Vq5tT/Ae BTEqh61wPYkRYRBVxPa79boC9AJX+CAF9vvp6I1IkpkBjxhV3LHyQAP/Hp6mByf6f7Lp IDRiz861To8D4q61ElFLwbleJpVZs7zE1FkzwtHsdE2cc29tt7P3qUevf987zXvW+JPF wjM4NNvFw6kS3BJRf2F2Tkhho5Lrbu4oia1Tcf5LLzaQARioxsPaMsHTeP5M8WgXmkwd amwLboLsAOtjoafXUk6bI/hBjeGvB/doK9WtHzSNCyxGhoPoyKRpB8Ch9mRpUAbACrDb jNGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si3223108eje.64.2020.09.25.21.08.53; Fri, 25 Sep 2020 21:09:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729134AbgIZEH0 (ORCPT + 99 others); Sat, 26 Sep 2020 00:07:26 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:39534 "EHLO mail-pj1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728935AbgIZEH0 (ORCPT ); Sat, 26 Sep 2020 00:07:26 -0400 Received: by mail-pj1-f47.google.com with SMTP id v14so472151pjd.4; Fri, 25 Sep 2020 21:07:26 -0700 (PDT) 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:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WVVMmOaizRCAFyknMCJGXyHul5Kj6HqFHMuAWn7Lcko=; b=qJPjUWjfBkpBKlnKwdC4zSOaH0pVj9HrIEG6EbOLYmPSGGxYXG2o8En+6skZjz91HV klTAYCedT3wPXBdWn2WCNw36sgbnVgvfJXqMorJE6HIzV8lMIDclEv9cFjJ5rQBP4n4z nIrOBsl3ehUDdMOlgEJIqZUlB0xK0WdCczvaYaMs6R4j50W55dFolmu+TwEohWGqBc0z kKF5xhK5T6k9UhfoePduGyZMKiO9kNs9nr/Dv5VAjwu3qaVSO3bIS7K1EcYEQfcnCksQ v76NFNPXFcEnFBh3WJtjyYdX3wlUMSmuZ1H7lbDwpKVjsjRTFA6Z2oyf6WQ0a+XzsMSu lWXw== X-Gm-Message-State: AOAM5310O4cn1Y+6DAyNJZowtYb3VHG41dx8xNUNA1PRhYnoS9ZXGWMv iBDUh2va/dGE7l7ZihlFr66juJl1vno= X-Received: by 2002:a17:90a:a40d:: with SMTP id y13mr616714pjp.183.1601093245239; Fri, 25 Sep 2020 21:07:25 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:8ee4:7db:d6f2:5686? ([2601:647:4000:d7:8ee4:7db:d6f2:5686]) by smtp.gmail.com with ESMTPSA id gj6sm504846pjb.10.2020.09.25.21.07.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 21:07:24 -0700 (PDT) Subject: Re: [PATCH] [v3] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps() To: Xianting Tian , axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200926023947.1891-1-tian.xianting@h3c.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialliWU447Bts8TJNa3lZKS1 AvW1ZklbvJfAJJAwzDih35LxU2fcWbmhPa7EO2DCv/LM1B10GBB/oQB5kvlq4aA2PSIWkqz4 3SI5kCPSsygD6wKnbRsvNn2mIACva6VH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87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: Date: Fri, 25 Sep 2020 21:07:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200926023947.1891-1-tian.xianting@h3c.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-25 19:39, Xianting Tian wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index b3d2785ee..62d152d03 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -3256,9 +3256,11 @@ static int __blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set) > { > int i; > > - for (i = 0; i < set->nr_hw_queues; i++) > + for (i = 0; i < set->nr_hw_queues; i++) { > if (!__blk_mq_alloc_map_and_request(set, i)) > goto out_unwind; > + cond_resched(); > + } > > return 0; Reviewed-by: Bart Van Assche