Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp309913rdb; Wed, 17 Jan 2024 02:42:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0HCI5/MftrsaZal7zrCqCVp0wL+sFNiBVl4CbUZl6bPbYZWNcat4IdLLkUDRw7wGLtV2Q X-Received: by 2002:ac8:5cc7:0:b0:42a:139f:8c30 with SMTP id s7-20020ac85cc7000000b0042a139f8c30mr54740qta.58.1705488124907; Wed, 17 Jan 2024 02:42:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705488124; cv=pass; d=google.com; s=arc-20160816; b=UYL92zeI3neIMSa4rJd2QLO4bU/ONj/8COHFP7uRUk13HY2bJ9+S+F7wUO6Vn8FgzC lwTqX90IeXaZxPu49puJaF5sj39gh35lUFObViR+/DAYUzGcqsxAL2n+Bdz/iAd2unBg GSew0q4rVY4s4hdBWnhLP7GJPSZgiWXFEwc+NpB7GyEkkThh0QjA9JGA04iF9BLKbr0L rJoKEoExVzLjW3SkLZzcvG6WL+z8BhrD3a8nHnxLbCXST/7f6KVgQ37/7T111wcBhs0j bjRi8YYvTsfum/sxCbU80Kkr9b0S9DGiLT9/wKDMUDroA/BfQIpD+JErxEijpwbdGCmB RKOg== 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=ml/MfLxZA9QQVAxJtw3+x9j+f1i/P0GKune3jqkXEnM=; fh=ivuAEGU9azC/O8ek54tRCZVL+SmIi8VbdfoR6X5EUXI=; b=zv0DIloN6HLnpyuGO8w8grD6aB3TkVA07iuxlHMiuqhQ8qGnsn95Q/BKYOOf63t7Rf GMOcnxuDOPxY6sDpp0LjNjdeMwtn9zLwI7D3uZHjbdlWfrsudDOUfcRACjL90SzXk1rn PvFcgVxcI8N5UrMaafdADOgo7CgkBSszB5IIqjqeniArrqba3g8/VOtolxilP5ZB55o/ dqDhre6RsWOBFfxMZx6DuacO9LFBQo9I9r2vDkB9SZDBz5SaYir0Cz7HhLZV/1EZfU+3 ewLbz8iAuYjRT/FXuX3SzrJ++tbCIwXLsIin8fZbM6jBed3JlUhnaOb3g9ZmEnP2DIQA BzLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=FTcsmErh; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-28854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d19-20020a05622a05d300b0042a0802e34asi2328402qtb.350.2024.01.17.02.42.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:42:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=FTcsmErh; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-28854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A9A7A1C24BF0 for ; Wed, 17 Jan 2024 10:42:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5762D1BF31; Wed, 17 Jan 2024 10:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="FTcsmErh" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 5417414A81 for ; Wed, 17 Jan 2024 10:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705488120; cv=none; b=RB0amecpWVTSKAnUE6M4fOnJ0dvQX30QcfFSvujh4BZW2fjYqDbNcYKfTrxz7CWjE3FnYziFKWEuiHIhoj1ZcCGfCKbkF6/u0uKt4lj90HTIy28y/6pKZ8ONplF3HZtAKLd/isTz6TP90IUvgUgpnnRHbXGg8uTNKUdRz0HJ/7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705488120; c=relaxed/simple; bh=i5zAIMMhInYEAGrZi/IN3RMlZQssJ1GyHiDWEAWZ3dY=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=YD6zLEBHhNs9W7FjpWcsxvXIEEywTpzshJ+UdBXQdFPIBR7LH7HnCb7bmyf8y1fN5VuzbwPVQcEtA3/3t+rDAB7+vQBTsAwa1OD//KNJZiXzLHO7TMEkVMsvixXuqb549rchtyIlGac0obIvn3sfVMifN5sKsyhgkZug8RV1YgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=FTcsmErh; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50e7af5f618so12035206e87.1 for ; Wed, 17 Jan 2024 02:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1705488116; x=1706092916; 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=ml/MfLxZA9QQVAxJtw3+x9j+f1i/P0GKune3jqkXEnM=; b=FTcsmErhyEIMHIi2/81A/HvyjgarveY2Gqn3vj5/AztA4wm3Kyk3NjnTNHrZ73vKIK wTq+wnlQ2LDdIIUjzL1PF5VkpTCYbEGc7biqCJ89NCoHwAO01kq+hBULjhp0/dRqGqRb B8itsq6iCChoO2FtsPtxQR60ghWB8rdy2rgvQFFLc+uSMd7ALvVIBj8RzI00bWeq7Xrr oq0weMC29RBLZNTP+aXx1FpuLjamCUsJP/EEpWjdlBKYCOx4DFtC7sPTnnSNtuVEQe8d I6o6h37S9uTL7qK+SEL5M3mQXrHkzMopOX630MAjpa4bY28fZlx7o1A/LkuIxDp0sW+y volA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705488116; x=1706092916; 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=ml/MfLxZA9QQVAxJtw3+x9j+f1i/P0GKune3jqkXEnM=; b=Bzv9HYhdrQUgHq+XHUYBAogcEk1pFS9se9VYszUddiBQrKNzN59JNAHY+w3JymRH2k j9UAB5Nm4ql5svuFFqz0EHLPUJZwaZEnGf0oP/9D7X63pj3UftXZoSdg+1ZKfpympuqW zniXAappZA18zQnpwDopHhee+l7Gw20cjpweDJqKaKvp0w+0B735Avs2E2Y+fi1FgW/I +WzOsL2w0tUOjv0Or0LSbs40GNLsFFRC1FxdnMbSxQnUWnCVGq74CCfySlby/SGzxNLa GdVuzzvOKQnd3FlF5vlkr5y4u8DmtJFM4tX3+sRtCjFJ2E4a8iLCHzmk72MCxuZR5Ccw 5DuQ== X-Gm-Message-State: AOJu0YwjvD0aBBxTLMY1Ulhb1neqC+DG7WUIzqKWv4pJJMbqyI2naXUD i+f6jRY1fOf3gz3ZkbnuiHrM1+XrDnlRsSbsw+rAbKnnwG1aFg== X-Received: by 2002:ac2:4c41:0:b0:50e:771b:9a9a with SMTP id o1-20020ac24c41000000b0050e771b9a9amr4543582lfk.73.1705488116076; Wed, 17 Jan 2024 02:41:56 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Zhongkun He Date: Wed, 17 Jan 2024 18:41:44 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] mm: zswap: fix the lack of page lru flag in zswap_writeback_entry To: Matthew Wilcox Cc: Nhat Pham , Yosry Ahmed , akpm@linux-foundation.org, hannes@cmpxchg.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chris Li Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 17, 2024 at 5:04=E2=80=AFAM Matthew Wilcox wrote: > > On Tue, Jan 16, 2024 at 09:40:05PM +0800, Zhongkun He wrote: > > 2) __read_swap_cache_async has six parameters, so there is no space to > > add a new one, add_to_lru_head. > > That's easy enough. Define a new set of flags, make one of them the > equivalent of skip_if_exists. Something like: > > typedef unsigned int __bitwise read_swap_t; > > #define READ_SWAP_SKIP_EXISTING ((__force read_swap_t)0x00000001) > #define READ_SWAP_ADD_TAIL ((__force read_swap_t)0x00000002) > > There's only six callers of __read_swap_cache_async() to convert, so not > really a big deal. > Yes, thanks for your suggestion. The major problem is not the parameters, but the need to add three function= s to deal with a special case. Thanks again.