Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp19920pxh; Thu, 7 Apr 2022 12:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtV3EnGvhViwAzdjlhsYeyftL4YN8QYkMnEw7H1KNbeAN7F8htlT/Imm2T1QxxP1YH8EC3 X-Received: by 2002:a17:902:aa81:b0:156:a183:b2e0 with SMTP id d1-20020a170902aa8100b00156a183b2e0mr15692100plr.73.1649360512318; Thu, 07 Apr 2022 12:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649360512; cv=none; d=google.com; s=arc-20160816; b=jYa4Iyge8lKNNSGbU8Y+Ox8+5ADa1gsNuPSNTVOyL7tAecSg0eDrVFkXA+EzwhK4t1 qSuJ0rrRsaRbRD8BDGVzWhq2r4vlZMHxfzuy+7DTJYsDfY2RgDhNerSkRnFq2JxvCmrk 13uQLepOY8lU+WIxs1B0ccvhO4lcriKXSusqXdTwBUv8bqAmUaqdlBY+axX05Qs4P4eS sEUF76k5WgqpdOmLVhFBv4hUQwUXNaXkYnBBuiqWaIhSSTBf9sEwRn2IcaeqlTU5RfIc SQd+oFEKxope5iuLJT65xFuuF0m6b4B52LNi13FQ7DeanOTgdi88CZDHUKj4AJYiYK2X 8S4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=A3qh5xwVPZT7wT/DloFg4q605++F7zyY0qU0ewsIYY8=; b=bh6bl4SCd3vTamRpyJeVrF467ihe9eG6c7iAM8kXlwG2POPcPTugybHjPoeFAtEHA4 Z8Ve8ABlrd4Xx3/vnMiRbz20avePFM3/WU2N2tTdqAkA4eBwHLmD8tsWpoumQFOuPqoe Y8ImLIWolYm9ET1pP/lr0cTRadBF+ZIvVhFHFwcFTARWkfotyrygSPcLnPmbIB07ows1 kKsc/D9Ngg6uNqMDXa5dbeLps+bkPauZi65Z7gwBnnBwDryBy1tyzMKNrTi/8XMA5N/5 LfXEKCZZurTilhMeq+IZUpjU99G7kS+Zd9OrcL0DjjM8ONJ85hp7dKp96pemWMdhLvh0 GB5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LkQDTv5S; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=96QySFT8; 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 q11-20020a65624b000000b003816043ee8asi16431369pgv.127.2022.04.07.12.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:41:52 -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=@suse.cz header.s=susede2_rsa header.b=LkQDTv5S; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=96QySFT8; 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 E91911EC603; Thu, 7 Apr 2022 12:17:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344389AbiDGPEc (ORCPT + 99 others); Thu, 7 Apr 2022 11:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbiDGPEa (ORCPT ); Thu, 7 Apr 2022 11:04:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFFB0EF; Thu, 7 Apr 2022 08:02:30 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id A282F1F85A; Thu, 7 Apr 2022 14:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649343384; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A3qh5xwVPZT7wT/DloFg4q605++F7zyY0qU0ewsIYY8=; b=LkQDTv5SVqvod518dmlEkVzKTgtsgaw0IarJjKqmWTPNA86Q+EMb6Yfjl42sFUP/K0VWHH uv64L11+oKs0i3fcT1p0V9Tk+MViwOLUHdRDL1OTX5ld9ZYMAwq+EnSo9rY9Q4jecoGIc8 dgghUbNDzjryQSeclkEmHsmR1DO9TDg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649343384; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A3qh5xwVPZT7wT/DloFg4q605++F7zyY0qU0ewsIYY8=; b=96QySFT8C7XlCIKIyg098bGKDMV7nOxhCy8h0EE9Qwl68xSc0Oaqaac4X0J64YFu6POivq di47mHEWAmSJq8BA== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 690C6A3B88; Thu, 7 Apr 2022 14:56:24 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 2B7EBDA80E; Thu, 7 Apr 2022 16:52:22 +0200 (CEST) Date: Thu, 7 Apr 2022 16:52:21 +0200 From: David Sterba To: Sweet Tea Dorminy Cc: Chris Mason , Josef Bacik , David Sterba , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com, David Sterba Subject: Re: [PATCH] btrfs: wait between incomplete batch allocations Message-ID: <20220407145221.GF15609@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Sweet Tea Dorminy , Chris Mason , Josef Bacik , David Sterba , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com References: <07d6dbf34243b562287e953c44a70cbb6fca15a1.1649268923.git.sweettea-kernel@dorminy.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07d6dbf34243b562287e953c44a70cbb6fca15a1.1649268923.git.sweettea-kernel@dorminy.me> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) 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 Wed, Apr 06, 2022 at 02:24:18PM -0400, Sweet Tea Dorminy wrote: > When allocating memory in a loop, each iteration should call > memalloc_retry_wait() in order to prevent starving memory-freeing > processes (and to mark where allcoation loops are). ext4, f2fs, and xfs > all use this function at present for their allocation loops; btrfs ought > also. > > The bulk page allocation is the only place in btrfs with an allocation > retry loop, so add an appropriate call to it. > > Suggested-by: David Sterba > Signed-off-by: Sweet Tea Dorminy Added to misc-next, thanks.