Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1322842imm; Fri, 1 Jun 2018 21:35:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKi5P9/kI8OaGR0BAUYDaLEM8/uj5bUt2/7sNrFTV3cA9UoMS+u5Ry9tmmpsAVGFhOMFMG5 X-Received: by 2002:a65:578b:: with SMTP id b11-v6mr11136125pgr.57.1527914101146; Fri, 01 Jun 2018 21:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527914101; cv=none; d=google.com; s=arc-20160816; b=QbBtYUAB/lVWk0bHXbXjyPEQRz0KkGXFPcJshLjwzMAUzvsd28Ced0p+OyOxfQB/5m 1SZWElMZBNexTrf298dyMvdehmQKRL8QIvMg5wjkmWR4OiBGQneLJdLqjf7hvU2jVyEy y8kzo0qHfPaRKLidFqyAnXsg7Pt/vwd/OMAdvt0cR+87u/kvG6EokbOgqmLpoxjtREOJ CP+JW816wcyUay1JE34e2E7G2f1vJ+RUZLQvUG6VO9HeQuXiM1ooRR5JqD2mZJT5trPx +Qay13+sSWEgiB+EWVKTc1P5evo+fuSN+Uin2l7wRzrXYAovXsF2dQ8xbtHt66fZNiOJ 7rKw== 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=uwCMLSZEh2d0lnB35jawTafpNUaW0jqpXQSHriXYT5I=; b=uWe8T9vHJs9q7oBt5KGAQQFRl3BAj4jzwLUxHPMB5tYTUJo7PEShFxK3NctCmNNXJT mvnC6kxbMHJT1OFdFcORKCxYCVG8zyVcpw1U2/xw9ib/mlT78FAbgJs2oLuO9w2sPPCg fXg4DxG+AK5xfW1KaDTr3819CEh9QhEazwYKyJCPWBCaKNELAPQz32crrbKAEapEMPlJ qik8+8ZftwwUG8Yb/F/NCZDi6wQNEBAU27fzETx7P1VP1OnpQxI5zJOaCqeZZ9D6vXDY qhhLwvHw9/lhoiducu7p4BtNParranR1q9sAi5fnztKZ/2PkU8aPjffSc2FgZSJr/yPK vmtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Twm38e4h; 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 k123-v6si4161562pgc.203.2018.06.01.21.34.15; Fri, 01 Jun 2018 21:35:01 -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=Twm38e4h; 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 S1751381AbeFBEbU (ORCPT + 99 others); Sat, 2 Jun 2018 00:31:20 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:36733 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeFBEbS (ORCPT ); Sat, 2 Jun 2018 00:31:18 -0400 Received: by mail-io0-f174.google.com with SMTP id d73-v6so32032639iog.3 for ; Fri, 01 Jun 2018 21:31:18 -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=uwCMLSZEh2d0lnB35jawTafpNUaW0jqpXQSHriXYT5I=; b=Twm38e4hrckoTgb8/KK5Sge/9btRW9NNBTG/OOZVFXeWiQo8TkdQj8zlVd5oK6Ywg4 jgoiYASh13cB6g0UC4zgSLm2/VC8V7MZw+jnf0nvTzlquxLhJhHSQYgzT7LskOIxScUd euCSCRFZHLxez9O6kI18dinrGYmewEG/rN3KlloPoy42erODs1OiWalkfkrwuJscdFfW wbJ04eJxVRnAfQpuInzHPdaugygQTBmU5tR66tRDZ+4C1KskPw7c30yafRWHkpPKoISg /pWtPpq9poYWyzvwUQTvJZsodWahdkx66GqQ150D6geQl8tAMqZSkC12/jYh7xMpzHb4 7f5g== 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=uwCMLSZEh2d0lnB35jawTafpNUaW0jqpXQSHriXYT5I=; b=aL0mFknMAoVt4Pwm5T+O4qEyeNzhja5vL8twDgxYNFgpBqI3dg+dVAffbKmzLYELoI aHFW+d/EQ1S0UM4Co+INy/yBomR4L8r6YTCrn+q64aOHJDrSeZaBm1UmkiAMv4ZHJyat H2vL+xvT3t0iUtDUCJKUjkc37ElgnzXI8gU08hdqQBsqk6gmC6JByrF+f58Ov1pmynui x6+Jbfxd/NFuMx+zCqxsU8OI8NW8k/PaNcl7Tm8mrgdmT0gHtVmzVqSx1h0tMkxsKK7l LRQL988XlH32nL9eHX+mArk1+bqSUvO3Q3mCtkSnjNtTGjpuJQjbMAmrgQEdBpBthaXU G5IQ== X-Gm-Message-State: APt69E2Q96uYyq8lpy+k74UVpdU8HsPA9C+zBLy4zPxA6Ah5InmRkhXz mz5euaBSOHrb60SlU4Upton2zw== X-Received: by 2002:a6b:f112:: with SMTP id e18-v6mr13103073iog.253.1527913877651; Fri, 01 Jun 2018 21:31:17 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id n202-v6sm1791314itg.23.2018.06.01.21.31.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 21:31:16 -0700 (PDT) Subject: Re: INFO: task hung in blk_queue_enter To: Ming Lei Cc: Tetsuo Handa , Bart.VanAssche@wdc.com, dvyukov@google.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, jthumshirn@suse.de, alan.christopher.jenkins@gmail.com, syzbot+c4f9cebf9d651f6e54de@syzkaller.appspotmail.com, martin.petersen@oracle.com, dan.j.williams@intel.com, hch@lst.de, oleksandr@natalenko.name, martin@lichtvoll.de, hare@suse.com, syzkaller-bugs@googlegroups.com, ross.zwisler@linux.intel.com, keith.busch@intel.com, linux-ext4@vger.kernel.org References: <43327033306c3dd2f7c3717d64ce22415b6f3451.camel@wdc.com> <6db16aa3a7c56b6dcca2d10b4e100a780c740081.camel@wdc.com> <201805220652.BFH82351.SMQFFOJOtFOVLH@I-love.SAKURA.ne.jp> <201805222020.FEJ82897.OFtJMFHOVLQOSF@I-love.SAKURA.ne.jp> <25708e84-6f35-04c3-a2e4-6854f0ed9e78@I-love.SAKURA.ne.jp> <20180601234946.GA655@ming.t460p> <95c419d8-7f19-f9c0-a53f-3d381fe93176@kernel.dk> <20180602023622.GA2306@ming.t460p> From: Jens Axboe Message-ID: Date: Fri, 1 Jun 2018 22:31:13 -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: <20180602023622.GA2306@ming.t460p> 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 6/1/18 8:36 PM, Ming Lei wrote: >> clear the bit when we need to, potentially even adding a debug check to >> blk_queue_enter_live() that complains if the ref was not already >> elevated. Though that would be expensive, compared to the percpu inc >> now. Not saying the bit is necessarily the best way forward, but I do >> like it a LOT more than adding an argument to generic_make_request. > > We may introduce generic_make_request_with_ref() for blk_queue_split(), > what do you think of the following patch? Functionally it'll work as well. > In DM or MD, there is the following use case: > > 1) bio comes from fs, then one clone is made from this bio > > 2) the cloned bio is submitted via generic_make_request() from > another context, such as wq. > > 3) then the flag of BIO_QUEUE_ENTERED is inherited and causes > the queue usage counter isn't held. We don't copy flags on a clone. -- Jens Axboe