From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2040E3F7A94 for ; Tue, 26 May 2026 12:13:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779797598; cv=none; b=Ce3Qea1wdkoRCAhrEvKtInhJ+MiFjy55OsWR6eYkaCMF0vsnkxsbH355OWNUjfjwj88kTFrz7hk4G3zmww6pDvNUNAesbfqainXMasV2lfW+9VIF0QwN9dqO/EGWMmcGBbMNG6WqoR41A8FmzRQGBGY4Z2cBOv+Jo7J3SkkpmdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779797598; c=relaxed/simple; bh=PB9Hj5d1pMEsQSU510QFvQ0KXQN9a1vcMWUu9/jlhlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WTU/HllBIHoPQpsHZgPHjZz7yGbRguPkyqkVbpoPtkCzR82hHRXMDzxqO4pmAHDYk5B/TbabixbLXv1mal27IMDF5RhbViwVaF8SJ9k/UaI75WVwFnvVJAR6OxmuPqFnTGdS7jg4r7cs6gY+Py6EhPNi4rKtUY9j0kpPJT3JmZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PREFrXFI; arc=none smtp.client-ip=95.215.58.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PREFrXFI" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1779797594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LaWillwD/sY9Lb94/+xBlcec/pOF9pnEg6dz9vRBmKM=; b=PREFrXFIFuOHhyJC0IXjI/3QmhsMskprreVhPcnh+Mv+KU8tYRFf2SQELRXyTPsd98IQo7 Dmbvwdh7gN6WWdAE5cRa7FadKopSjced54zAdePttWyFc5gKuE5/ajAHVQDmcER08wDuQI hPheZMTs/FzI8KutxcPkgArlNsmLixg= From: Usama Arif To: Johannes Weiner Cc: Usama Arif , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Shakeel Butt , Michal Hocko , Dave Chinner , Roman Gushchin , Muchun Song , Qi Zheng , Yosry Ahmed , Zi Yan , "Liam R . Howlett" , Kiryl Shutsemau , Vlastimil Babka , Kairui Song , Mikhail Zaslonko , Vasily Gorbik , Baolin Wang , Barry Song , Dev Jain , Lance Yang , Nico Pache , Ryan Roberts , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 7/8] mm/memory: flatten folio allocation retry loops Date: Tue, 26 May 2026 05:12:59 -0700 Message-ID: <20260526121300.2526755-1-usama.arif@linux.dev> In-Reply-To: <20260521150330.1955924-8-hannes@cmpxchg.org> References: Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On Thu, 21 May 2026 11:02:13 -0400 Johannes Weiner wrote: > alloc_swap_folio() and alloc_anon_folio() use a top-level if (folio) > that buries the success path four levels deep. This makes for awkward > long lines and wrapping. The next patch will add more code here, so > flatten this now to keep things clean and simple. > > alloc_anon_folio() already has a next label, use it for !folio. Add > the equivalent to alloc_swap_folio(). > > No functional change intended. > > Suggested-by: Lorenzo Stoakes (Oracle) > Signed-off-by: Johannes Weiner Acked-by: Usama Arif