From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13BC82C11F9 for ; Tue, 16 Dec 2025 02:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765851795; cv=none; b=QTcNn5OkXSiPRaqleYJosJMcGHLnq5f4YiEFOOpmIiBJXjQTOfXcPNCejkHIHsFLbP4eDnGg8TcCxDQL2AvkUU4llXm5jl7EFKsV/ddGvgp4T3smklvsRVWeguZuf1MlTeAn0qTDRaicbymnw+oyz0iP7AeqfLYQY7zRIX+B84Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765851795; c=relaxed/simple; bh=Ng3XKtYzcqs3QyB0tnd5OjYA830AFLZFWFUSOxyXL2Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nlhy21iHrSV8kUdIeYSE/7FCfLXE+5mazR79vn6adhs3aON6Q8QMqKpVLfz9K+z0XoMcDcpj040DHp2Y26+XAc+jf1CQr9sZlInEjMw3vT8RJZIFrK9k/MdeSSo4Cr4rR494bMSVIRu18YepOI2ZrthY0E2+TV05Dn9WryLx5JI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=dwFKVww1; arc=none smtp.client-ip=209.85.210.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="dwFKVww1" Received: by mail-ot1-f66.google.com with SMTP id 46e09a7af769-7c750b10e14so1776162a34.2 for ; Mon, 15 Dec 2025 18:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1765851790; x=1766456590; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=97NP7q40hxg4C4aKfTESLyYY7arcjR+J9fUfN3qZbks=; b=dwFKVww1TTDVt3I17gX7q8URKllnAr6RKGHcaWTFtb1LJ8KZuhNexDAqcDfcg2k9N4 gGYRFivMfLj7sqPtvxw+BRPanwpVXWm3s4BN/ftMEqGcz3Ldw2jL6KYPWZ1fB9W3R4C2 esA2xKwIPmWQb26SrPRfjzPRklqjFkUSYJs2LMx+cwDHhAMd8cPSdNjMWI5C1Ss5OmT6 d4V4YluAXjWWxBFfQLLwZBah9lKA+XeRCQDpX0Qtu/Mkjr071HnphW34mNBVptV34X/A 9ZmFaEDGZCoNZSun5NvejHWLOOZYWaikZVAgWZcCMUy6LDeU/a88m/6LDWoH6ptQ/kh8 wH7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765851790; x=1766456590; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=97NP7q40hxg4C4aKfTESLyYY7arcjR+J9fUfN3qZbks=; b=jwFdMSenNthEbmq12m/TE0MZkIhi1Egk4JgZ+ka+2lrL7r3Ha+Fos2D1jjm0YosUaU APlE+9CpvPRvF4UWTQ1hFOtHqOG6CrPa9i9HErJMrSzHO4MORnQpWySu6gOaQ+fyBu9h IjTgtpqZf35/VoR7tXMz/qZmjLKGqzEHTftrlbs7AT89+RKidbGYMgpbIko5iwULcQfW mbCnWVq9zT8HO49eElk6Cy1gaP6b9IMlQqFNWj8rKthWTrzAkhPyzKj3hrT2gG5CMf1u ljmt8StO70Bukc3osZ7nuDq1Yqe0Cs1iBm8qnNB4/iCtDmytJ+rZ/77KlzSRDfd3BSo4 DZdA== X-Forwarded-Encrypted: i=1; AJvYcCWIDI4QGLdBqXSMBxlYoQKB+UrlswAN6LrPNAHOrJBl4wDXz0f6DNbotzFNvQPAUsFFhVCKP0b1i/3pkzs=@vger.kernel.org X-Gm-Message-State: AOJu0YyFt8uZBzGC+U72Jt80Wvx3kl8uFZG78TjJ/XkD61deV3s271aH C+mAZ5DNT4e42nb/SBAr7dpatNieKCq9SSxXofnXkKeiBX7Imydpg5X4nmzxiEFl7PY= X-Gm-Gg: AY/fxX6XeguJvHlq28pR3L4cJIzgZIBBoTQjAxbI35aviK0z4NLXP0x/2HlCNpOAo8O UPxJJhANf9DJErfLj06KyTfjtFketrXGL0HftBfFGwbNHCwRJ5waavfQKdg2aT1NJlitGveTEU0 BbIZhBg2+2xxcxVPDCUq+Z9btcG+r80lP3FqJ2Gw6EL4MRAnbay8Vvt2zQS3t7ieoklOT8tn6rY 7k4eTu+L5Psdm+ftZCafIT+SdaQACBsNsDMDBOvmpF2hm3VVCEgg8gFN0B1EkBwp5kMfA7glSpS E+yLUO09fUfd9ELCKscd/mxCGDJ0Ec6goigZjMeZND+Cbyj+2niOtXHr+u26Be1B5M4vuNMZISV rIcHhZRLVjIvHVtUuSLYuXoXMbc+OPIIZtX5hJ6TL3DJBs1bETpWUe4J313QwHOR7oHBneMpTF8 EeUGYmnVI9 X-Google-Smtp-Source: AGHT+IGw49EXJuZm3frjyR11xkPH+vdqLYoeS1FUPQDYXLmra5UiAdf2Xx2U8pJgwATRG6fINRGdEA== X-Received: by 2002:a05:6830:4990:b0:7c6:d001:afb2 with SMTP id 46e09a7af769-7cae8398d7emr6145680a34.35.1765851789989; Mon, 15 Dec 2025 18:23:09 -0800 (PST) Received: from [192.168.1.150] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7cadb1ff4desm11006188a34.7.2025.12.15.18.23.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Dec 2025 18:23:09 -0800 (PST) Message-ID: <09d2d256-2eba-41ea-a397-dca4df5d5a2a@kernel.dk> Date: Mon, 15 Dec 2025 19:23:07 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: retiring laptop_mode? was Re: [PATCH] mm: vmscan: always allow writeback during memcg reclaim To: Johannes Weiner , Christoph Hellwig Cc: Deepanshu Kartikey , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org References: <20251213083639.364539-1-kartikey406@gmail.com> <20251215041200.GB905277@cmpxchg.org> <20251215200838.GC905277@cmpxchg.org> Content-Language: en-US From: Jens Axboe In-Reply-To: <20251215200838.GC905277@cmpxchg.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/15/25 1:08 PM, Johannes Weiner wrote: > On Sun, Dec 14, 2025 at 10:59:11PM -0800, Christoph Hellwig wrote: >> On Sun, Dec 14, 2025 at 11:12:00PM -0500, Johannes Weiner wrote: >>> That reasoning doesn't make sense to me. Reclaim is always in response >>> to an allocation need. The laptop_mode idea applies to cgroup reclaim >>> as much as any other reclaim. >>> >>> Now obviously all of this is pretty dated. Reclaim doesn't do >>> filesystem writes anymore, and I'm not sure there are a whole lot of >>> laptops with rotational drives left, either. Also I doubt anybody is >>> still using zone_reclaim_mode (which is where the may_unmap is from). >> >> Yeah. I wonder if we should retire laptop_mode. It was a cute hack >> back then, but it has it's ugly fingers in way to many places and >> should be mostly obsolete by how writeback works these days. > > Yes, that makes sense to me. How about the below? > > It doesn't actually get rid of the reclaim toggles - I added comments > for the other usecases. But it's a nice diffstat nonetheless. > > Debated whether to add some sort of deprecation sysctl handler, but at > least systemd-sysctl just prints a warning and still applies other > settings from the same config file. > > --- > > From 868f67e9d0d4465a6c22d8a147084944e7569c8d Mon Sep 17 00:00:00 2001 > From: Johannes Weiner > Date: Mon, 15 Dec 2025 12:57:53 -0500 > Subject: [PATCH] mm/block/fs: remove laptop_mode > > Laptop mode was introduced to save battery, by delaying and > consolidating writes and maximize the time rotating hard drives > wouldn't have to spin. Needless to say, this is a scenario of the > (in)glorious past. > > The footprint of the feature is small, but nevertheless it's a > complicating factor in mm, block, filesystems. Developers don't think > about it, and the decision-making in reclaim looks dubious. It likely > hasn't been tested in years while the surrounding code has evolved. >From a quick glance, looks good to me: Acked-by: Jens Axboe -- Jens Axboe