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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A11C38145 for ; Wed, 7 Sep 2022 18:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbiIGSUX (ORCPT ); Wed, 7 Sep 2022 14:20:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiIGSUT (ORCPT ); Wed, 7 Sep 2022 14:20:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81DDE8D3E7; Wed, 7 Sep 2022 11:20:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E2A52B81CAE; Wed, 7 Sep 2022 18:20:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5755C433C1; Wed, 7 Sep 2022 18:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662574812; bh=KQWGyHNv41x321doUhi43sZ1FeTYu6CJWUNdSzv+1/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nd6mcfLJ0sjGtWJeQJR4b4elyeG7EqwB1LFRvSJZ4RNpMLttNfu3ByHXmoKbMaJ4P 594CRL5DFwWuZsPi2rDol2IKZyR0qmFLq5dA1Sd5N690H+AwAnkwt5Wb8LRmEU0OmJ g2eAekDjo/CLI0zmeQF+ejMM1bqCK0WJn2Hq2FMxITfjWgRk3e7PfxU/GSqSxy5BDt Npyx9pzazOpSRpJbvJqXXQ46JKIHTJgtdpOVEC8JycNvsG9kQDvhl9X0YrqUxldLrO oJs1UZWzcDMAMhugq9wxLfgfmZkpBi0i60UMeuliuKCYBAcv6CPVd/HCTITfunjrsX 2Rfc/zgN/DRQw== Date: Wed, 7 Sep 2022 12:20:09 -0600 From: Keith Busch To: Jan Kara Cc: Yu Kuai , axboe@kernel.dk, osandov@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH] sbitmap: fix possible io hung due to lost wakeup Message-ID: References: <20220803121504.212071-1-yukuai1@huaweicloud.com> <20220907102318.pdpzpmhah2m3ptbn@quack3> <20220907164150.tykjl3jsctjddcnq@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220907164150.tykjl3jsctjddcnq@quack3> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Sep 07, 2022 at 06:41:50PM +0200, Jan Kara wrote: > On Wed 07-09-22 08:13:40, Keith Busch wrote: > > > > I'm not sure about this part. We've already decremented, so the freed bit is > > accounted for against the batch. Returning true here may double-count the freed > > bit, right? > > Yes, we may wake up waiters unnecessarily frequently. But that's a > performance issue at worst and only if it happens frequently. So I don't > think it matters in practice (famous last words ;). Ok, let's go with that. Do you want to send the patch? I have a follow-up fix for batched tagging that depends on this.