Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp29662pxw; Thu, 7 Apr 2022 23:33:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnO616FUzRt/ZTrf4coif5N1Mr8cx4XvL8JoqWDKfSVbi7i85TrS+27DWBWrbQr5OtZXVp X-Received: by 2002:a17:90b:384b:b0:1c7:41fd:9991 with SMTP id nl11-20020a17090b384b00b001c741fd9991mr20263931pjb.199.1649399594078; Thu, 07 Apr 2022 23:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649399594; cv=none; d=google.com; s=arc-20160816; b=KJNd/27Yw2OIZGVbqAJe8MlYVXGJA3Qb7q6ANxeC1v716fYHjcCXYPuIoYMnhfW9pt ruXR/hfDu9khf2I5uxt2pqPm57CGtEquFQ8GCgXeDFoOCA5LjpJGonB0j2CbhBfu8fRo ivOpZkf28p3doASaFMI51B0wZgL/iZfosvj1hua2V75mu1n/BRjxvK2zDAG+vfCQbyLF T9rg1uYaGf21iZHMgfOvrCf/bItoEnQOE+8tgj8b+DN+Rp3FRr2W/lAAFRxe/S0lx8BI bj2vsYZDcsiSkHbKlWIXhJaIjZA8GbxSnlLEid0/RFn5VSPeOfJg2bl0pOrER6Pxc4fz HWcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N0WCejp+v+kyXa7cm3NCWrsAo5fYHCElP+vP7DGqpkU=; b=BKBT8oRDaKWrWFFpXVQt4yHCIjzYexcncegsPBt1/d6LNCm+BFM2umfHMh74cJUwad MWjxTf2ank+erXkmOpzGM2zKlyQ5UwsgVoTbsBaM9AI31R7ojkgirYyphQmXS3jXdMlg yHVrQ5HoNP4cCpNq7L71O106btYBq4eZxwO9MX57MxteDqgwgRZFjGgqsiLrfPCvwavQ CyUnVztTdf/DsvKEQGrDOpE8UZpFN23SlPj6b6wb9pC2ouP26d3KNwUbNLrVbZC0cJjR KhS/ja0pa+jraQfL3FnLlJDtXJqnaWLnD5CgNQcSI25EUfcot33ckeDEOwl56gPB31zK 3KuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hNcKPuqR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f18-20020a170902ce9200b00153b2d16541si31357plg.329.2022.04.07.23.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 23:33:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hNcKPuqR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4FFBA3701F; Thu, 7 Apr 2022 23:03:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235067AbiDHGFz (ORCPT + 99 others); Fri, 8 Apr 2022 02:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235061AbiDHGFx (ORCPT ); Fri, 8 Apr 2022 02:05:53 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD1734641; Thu, 7 Apr 2022 23:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=N0WCejp+v+kyXa7cm3NCWrsAo5fYHCElP+vP7DGqpkU=; b=hNcKPuqRNNbmPcChDNCCWTTrgS a34qrQmpXbirui9gVV1SrlYppFQpXwSJxzHPeu9ekJBzyqnp1DtqMKLgC4lFdc9daWW9jGvG2CiqV a7gmPwDv5LVEc4YMdRLh237xnQOZggoe4awfIcDdx96GyrYxP7BSta38ZxY5YrjWeG43WvH5Q4Q/v cJVQIqXKTDp/APn41qpqFnHT0tuh9G3xuGLTXHkMDY1lLaJOY7kn/+QGA64fsq29AXgO6DVJPxJUB /WGprhCkCaE9mYs2xI5YIihYciQf5xV+8dzGWZyg1mKbmZquNkoM0rLF6US0e57A+cN18EYPWcWbl Ujj4Jg+Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nchin-00FE15-UP; Fri, 08 Apr 2022 06:03:49 +0000 Date: Thu, 7 Apr 2022 23:03:49 -0700 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Shaohua Li , Guoqing Jiang , Stephen Bates , Martin Oliveira , David Sloan Subject: Re: [PATCH v1 4/8] md/raid5: Make common label for schedule/retry in raid5_make_request() Message-ID: References: <20220407164511.8472-1-logang@deltatee.com> <20220407164511.8472-5-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220407164511.8472-5-logang@deltatee.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2022 at 10:45:07AM -0600, Logan Gunthorpe wrote: > Cleanup the code to make a common label for the schedule, > prepare_to_wait() and retry path. This drops the do_prepare boolean. > > This requires moveing the prepare_to_wait() above the > read_seqcount_begin() call on the retry path. However there's no > appearant requirement for ordering between these two calls. > > This should hopefully be easier to read rather than following the > extra do_prepare boolean, but it will also be used in a subsequent > patch to add more code common to all schedule() calls. Hm. Maybe it is marginally better, but I always hate gotos inside of loop bodys. What prevents us from factoring most of the loop body into a helper function?