Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp70473lqe; Fri, 5 Apr 2024 13:00:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdORb+r0vzf8SxgluW05jds8zYDoruuzYa2H5nvjZt8IPsgY6XpfmcJwmWAL8gelWTICfZyoB2W6rh2Kj0vqqv7PDqIfxd1aMF2m+qeA== X-Google-Smtp-Source: AGHT+IH83mtqU66x+cPYwGihM068PwwzO1Pu96kJGudH4wKpAm/imVclGn3w2VhRmIhrQJpeCcQw X-Received: by 2002:a05:6a21:2707:b0:1a3:66e5:5c8f with SMTP id rm7-20020a056a21270700b001a366e55c8fmr2525267pzb.28.1712347212818; Fri, 05 Apr 2024 13:00:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712347212; cv=pass; d=google.com; s=arc-20160816; b=wqjYAmyawftXoDmjGYyHo/OJOqpem3pLenUwPR25vJpkDZvgZ/+dCfJfrWKczzYV+F t4Hl5S8rVAcABtwV/SFcC3lT44pphhrANEqzGnxkyTLYB9miCkC+68rfM7vXc6O7Aiar 5smT/mu8JgKLk3CivtEEhht9mOaCz6nrKm8r59ByLq4vIRwYsbIFdHoSRw0X/MK6dzMI QdGOExLYH3X4ggcNTlP9eyy3TQQLXoy6t/jIYedGlRw7gGouVI9UtuktjwQEOL2id3s/ s+EmaWUlTcc4ydEhGkNTJCMXJUCWJ+I940rQqQBa/cI+DmmWqXX//VzUaGf58qNoGzhZ Mvpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+mL082QxeIJSEgTMx+s0vW50/VBKne3hRMLli5pG5H0=; fh=co3FGJPxpZhHN5Nrr7o81hBwmfnw6VrSbFMbGklFUIw=; b=TyjhPFU8SrUWZndTVlVj0yNcrTn9WelUBJTdTpzmwG0OrX0H90TZjUBKlw4uVs7JIX EJvSL8cVHV+H/+tjKl3IGa8A5+v4tDmqI6xKbe1gpY5By0dGH3zwditAlrxlMdTBUFW6 BXA2b1arRr4E6qg0N6T3KakZeuPzaOELg+W48gfcjij2N+5yMLi1657LLIPMtLDRKNhL B0MYL1zSlx4bfFDbDQSN9AGWuxwXNAiJ3qvhMe9nqyeYOySepNJgGhdCp5vip9UmMnRq UuFxA5kXUlZaX3TEhtXKTslgVnSrYEWIG7SU94D8tr3ULLjDYn/bC0EkEu/8AoEXMSzi rZEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="j/CzELmz"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133542-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133542-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b8-20020a170903228800b001e3cf5b15f2si647898plh.366.2024.04.05.13.00.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 13:00:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133542-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="j/CzELmz"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133542-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133542-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id ADD52B21123 for ; Fri, 5 Apr 2024 19:58:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 260CD17333B; Fri, 5 Apr 2024 19:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j/CzELmz" Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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 C25A55D734 for ; Fri, 5 Apr 2024 19:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712347100; cv=none; b=IVEvoh1+IEroHwtf6lYHxd4KnMmcTyLcw5S3az4p09CJHdDhA8wI9ODV04lvLkTHq8rh2qlSLQ6A+tNdg4Bly8iA2Pxpq+Q+prdrBVhaAGtuW2lEgwF6w12CqU5dSSc5jzcZGnZZCoMNxFtS3z7M+6OZ+mDEaqPnlDRUeVedb3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712347100; c=relaxed/simple; bh=+mL082QxeIJSEgTMx+s0vW50/VBKne3hRMLli5pG5H0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nAjqH+g+hGan7w6v+9qw3VvYzKU2mmQD4W+FbtjT/QDGIcnKqkEEuxrfr9l8PgfK1NviSvFWbWeaNZdoYso9IWwkQNhCwo8Oi1foce2Ik2+x7cSqp2jiiAcBmAO73SA7tAq+LdlTbQl+NRn+kyqSF3kbP3EbhMl855GIRkhoAj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j/CzELmz; arc=none smtp.client-ip=209.85.219.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6992f97ec8eso14923666d6.3 for ; Fri, 05 Apr 2024 12:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712347098; x=1712951898; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+mL082QxeIJSEgTMx+s0vW50/VBKne3hRMLli5pG5H0=; b=j/CzELmzd+1JnMx8gjNM+UaqsPW/30HaIwbrStCY02CLMV+t4swdKX7Q7TkZiWzpeO gpryeMNZV5MEkIE1BRodr76gAhn5iC7/oCPNnEjLTo7MyLCDOuQfYKuUq5BAcDSaq9og mibio2e3eEGOy9xuHtDWFjLHOVlNAV78RJe6iFOShXGxjYxvD/nbnmZK3J8q3r8yUus7 1RyE4MjE3YWzr0E2e0h4K2lFMpJmayGjdt4OwgjePBYqWMC/KRcU3/TtLImi4hER5fpa MqjIvyZuZnyQsTfxo14smlB/50Z/L8cQvhT29Pj87rDmindslMPSX6Fk920ozC+8JSWX RuWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712347098; x=1712951898; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+mL082QxeIJSEgTMx+s0vW50/VBKne3hRMLli5pG5H0=; b=m1HpeB2sgRdE42rfOk23gAkpDTn1cOJ9IDrKem+i96vElQn/v/C44s4LeZAe/r6AhJ mdCHYJr+eh1XHVzasnes6zUfRgbwnVV+Y+10WmUALR/a06xnw66gsI8x811+4pO00RDt zqlj/kxkoaRhpcna6TO/0jUHnjUbD6+8+sfTW1W07dCf6PBFjE3U8WbIHI76pgJeuYTi ehwaHt677COB8xdnsszqjMF5MRF/TiJmQ25Z0OUir50SJyF1nQ7IC2GATVKxV1X+UkhZ jJB8yCM4I/ArWAajI5lUZhZ3e5/B3pQcnnoW/klKkHr+CpO1AX3olejzqdBY7xs4V/nr yNUQ== X-Forwarded-Encrypted: i=1; AJvYcCUEL+PTlkw189vE5JaLBKIfCMpuzRvf0riw2zorsmm7GvEwXCiK9Eq3AN3YrxAQT9bsRTy5NRX/vjWLimhawWhAF+spzORi4VEMgqy4 X-Gm-Message-State: AOJu0Yyh865NXrxFA6xduJL9m2PLSI1n/1DxtJF4I9cag0l80UyZhPcl iyjzpXQ+50O119XOMkt1SsQxc04OvnlzqNjp740tNMT1lS2hQK3XQLLjfm37SGh1NPS3z6n3VV7 Mkiej3faiY6PYJ+7a1N4F726LOdY= X-Received: by 2002:a05:6214:194f:b0:699:2274:b229 with SMTP id q15-20020a056214194f00b006992274b229mr2673929qvk.14.1712347097699; Fri, 05 Apr 2024 12:58:17 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240405053510.1948982-1-yosryahmed@google.com> <20240405053510.1948982-6-yosryahmed@google.com> In-Reply-To: <20240405053510.1948982-6-yosryahmed@google.com> From: Nhat Pham Date: Fri, 5 Apr 2024 12:58:04 -0700 Message-ID: Subject: Re: [PATCH v2 5/5] mm: zswap: remove same_filled module params To: Yosry Ahmed Cc: Andrew Morton , Johannes Weiner , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 4, 2024 at 10:35=E2=80=AFPM Yosry Ahmed = wrote: > > These knobs offer more fine-grained control to userspace than needed and > directly expose/influence kernel implementation; remove them. > > For disabling same_filled handling, there is no logical reason to refuse > storing same-filled pages more efficiently and opt for compression. > Scanning pages for patterns may be an argument, but the page contents > will be read into the CPU cache anyway during compression. Also, > removing the same_filled handling code does not move the needle > significantly in terms of performance anyway [1]. > > For disabling non_same_filled handling, it was added when the compressed > pages in zswap were not being properly charged to memcgs, as workloads > could escape the accounting with compression [2]. This is no longer the > case after commit f4840ccfca25 ("zswap: memcg accounting"), and using > zswap without compression does not make much sense. > > [1]https://lore.kernel.org/lkml/CAJD7tkaySFP2hBQw4pnZHJJwe3bMdjJ1t9VC2VJd= =3Dkhn1_TXvA@mail.gmail.com/ > [2]https://lore.kernel.org/lkml/19d5cdee-2868-41bd-83d5-6da75d72e940@maci= ej.szmigiero.name/ > > Signed-off-by: Yosry Ahmed > Acked-by: Johannes Weiner I see fewer code to maintain, I like :) The code LGTM, and we already discuss the justifications in the original series, so: Reviewed-by: Nhat Pham