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 0C59AC61DA4 for ; Thu, 23 Feb 2023 20:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbjBWUls (ORCPT ); Thu, 23 Feb 2023 15:41:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjBWUlo (ORCPT ); Thu, 23 Feb 2023 15:41:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ACCB3B0E6 for ; Thu, 23 Feb 2023 12:41:41 -0800 (PST) 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 0AFAEB801B9 for ; Thu, 23 Feb 2023 20:41:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 754D9C433EF; Thu, 23 Feb 2023 20:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1677184898; bh=TkXUXLA5gBCZu3aLudamBdXUQkmB7SrL7qYmG/yX4YU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fpA/zVq26DSk1Xn0u6GHkpwL7TNHAzwg1Brm4v94vivxGsmOx+qmTraUAMuHJXKVt DD8hIazyVdt8PUJLFVXcZe0HojBur1YUBqMpbJ4ZnzGvRNcwUXRFMYxp7KQCTKkiv4 IJkpVoBUYZpvWcCohBlQe2JJ+jgHv30VGuee35CM= Date: Thu, 23 Feb 2023 12:41:37 -0800 From: Andrew Morton To: Keith Busch Cc: Christoph Hellwig , Keith Busch , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue Subject: Re: [PATCH] dmapool: push new blocks in ascending order Message-Id: <20230223124137.e6fe921659e6f6f1c10668b6@linux-foundation.org> In-Reply-To: References: <20230221165400.1595247-1-kbusch@meta.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Feb 2023 11:07:32 -0700 Keith Busch wrote: > On Tue, Feb 21, 2023 at 10:02:34AM -0800, Christoph Hellwig wrote: > > On Tue, Feb 21, 2023 at 08:54:00AM -0800, Keith Busch wrote: > > > From: Keith Busch > > > > > > Some users of the dmapool need their allocations to happen in ascending > > > order. The recent optimizations pushed the blocks in reverse order, so > > > restore the previous behavior by linking the next available block from > > > low-to-high. > > > > Who are those users? > > > > Also should we document this behavior somewhere so that it isn't > > accidentally changed again some time in the future? > > usb/chipidea/udc.c qh_pool called "ci_hw_qh". It would be helpful to know why these users need this side-effect. Did the drivers break? Or just get slower? Are those drivers misbehaving by assuming this behavior? Should we require that they be altered instead of forever constraining the dmapool implementation in this fashion?