From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ACD0C433FE for ; Fri, 15 Apr 2022 20:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351729AbiDOUVC (ORCPT ); Fri, 15 Apr 2022 16:21:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351798AbiDOUUz (ORCPT ); Fri, 15 Apr 2022 16:20:55 -0400 Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F6FDE932 for ; Fri, 15 Apr 2022 13:18:21 -0700 (PDT) Received: by mail-vs1-xe32.google.com with SMTP id v133so4311310vsv.7 for ; Fri, 15 Apr 2022 13:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cbb1YDb5NaiuUde42DTRSKAfH6XbrCM5Doeox4W/L1U=; b=R+fWKSybpUALXVyi7dr5ULcwrcaXsKRmDx3orLXnDSP1dKdn6sslxaR84/Vt1idESV R0gbbnc2Eo5O2hvxGNOm5+O5l7zO9r5grwhRC/H1pjlfnAengg/oNlV3PjITQ52N9xvj ttmr00bahnI6zPcHkkGyVH85UyIFb3BiDQXe1wN6D7t4+4SOidckXgXl4WmZtYM9G8g/ aed3/o6NSjZAcWDOvNGsi7PFryJv2kBPX+cLbidK7S7FBT3z2r51EStnpXahSrD5q8Gs bTdzVJmEmNuyfh9W4BKstW6XQcg/tnhQUf9CLonBDa0jnHYmD9BzjVmbUocVwfvlS2tZ ESWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cbb1YDb5NaiuUde42DTRSKAfH6XbrCM5Doeox4W/L1U=; b=pqOavZBdCec2Q9DCwM4X/hD6LvYbvO68mPFsVoOzEc7nHrQ6Km3WVZVCeGl80A+tc2 k/5l74hhcdsvP392PhCEHDQykQeqOaUra2+rIWU7RMeOdrwHQFrCGreNfX8NQ+yYmMDp aZlXqW5LvDUPk5HWqe0MPUEmXQBkP3AuiW5B/EX3DWui8eejmWUFxX6IhxyGzVLjiQRY hPQGBZUI6Q/mlRwFUwOoZ5DNrhs26xLQeLkEb9/F6N1iyG94xNlrVnOSEZ1qf36bw6mO 4g39K/6aQgtL2zY8G2xp2okXJvrDAgmxwV37asT3DxeHIE7Vjivh0TYCI5QkCyiE3BGw 6BIQ== X-Gm-Message-State: AOAM531DfJcsgSjIScSuDWwPOdofVr+AFlKiR8vhSb7jahJjNElK0lr1 HRNbxOHp9F9aeeFGpRyl6QscxI4FrdjMGQajJ+oKpw== X-Google-Smtp-Source: ABdhPJwO94bILh3nEx3+nxP4ZO5hEG2ftNGY6x330YGarczURLY5R/Y+L+rCRpLt0Wpji7SMuT9MzVQDZVeugH9nIdA= X-Received: by 2002:a67:de17:0:b0:32a:4007:cd86 with SMTP id q23-20020a67de17000000b0032a4007cd86mr220678vsk.22.1650053900285; Fri, 15 Apr 2022 13:18:20 -0700 (PDT) MIME-Version: 1.0 References: <20220407031525.2368067-1-yuzhao@google.com> <20220407031525.2368067-7-yuzhao@google.com> <20220414143959.0daf4534613f2511b9b27f11@linux-foundation.org> In-Reply-To: From: Yu Zhao Date: Fri, 15 Apr 2022 14:17:43 -0600 Message-ID: Subject: Re: [PATCH v10 06/14] mm: multi-gen LRU: minimal implementation To: Barry Song <21cnbao@gmail.com> Cc: Andrew Morton , Stephen Rothwell , Linux-MM , Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , LAK , Linux Doc Mailing List , LKML , Kernel Page Reclaim v2 , x86 , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 4:16 AM Barry Song <21cnbao@gmail.com> wrote: > > On Fri, Apr 15, 2022 at 9:40 AM Andrew Morton wrote: > > > > On Thu, 14 Apr 2022 14:36:03 -0600 Yu Zhao wrote: > > > > > > or it is only something > > > > meaningful for the internal code? > > > > > > This is how swappiness is interpreted. > > > > > > > if so, can we rename it to > > > > something else? otherwise, it is quite confusing. > > > > > > Feel free to suggest something. > > > > It is confusing, swap_preference? > > seems to be much better. might also be worth using MACRO to replace those > 1, 200, 0 magic numbers to tell readers the exact meaning? How do you read "swap_preference=0"? I read it as "no (swap) preference", which means anon and file are equal. The real meaning though, is "don't swap"; and the "no preference" value is actually 100. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7FB18C433F5 for ; Fri, 15 Apr 2022 20:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+7hzPMglK+aZvBONmVF2PN5aLEPXIhq6N6HP49pXj6A=; b=4rJUb+Z1nej1e5 cZ3tVtg+sJ+ufyODmTzME3KWPMMEPOZ13k0n4ZiFi8C2kJRVOAqC6OOb3LMJDACHj6N3d3V0gOR/t fTBh7Bw6XWoPNROxfturdmFbbdC4IwhiEso847d35pJSnUUrQDa3rDXh6VnfGKwvj0HMXq9Nd0P4Z r5TxMZUXi2GYwG4fu4RoevqsqSliIWjMCSM1vm1IGIPz1fiHL5OL57qNM1E9jzjki9ukhtDjriAfY CEDm80Lu4+3IETDksfSOMU1JhYzyUbcefVZ3eu4gsFigmS2aQdMb64FAKzHxc2WzFLfWrb8dkK8Bo 9kdqZH5SzOWpUANnHyMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfSOm-00BGHP-6D; Fri, 15 Apr 2022 20:18:32 +0000 Received: from mail-vs1-xe29.google.com ([2607:f8b0:4864:20::e29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfSOi-00BGEQ-O4 for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 20:18:30 +0000 Received: by mail-vs1-xe29.google.com with SMTP id i186so7838918vsc.9 for ; Fri, 15 Apr 2022 13:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cbb1YDb5NaiuUde42DTRSKAfH6XbrCM5Doeox4W/L1U=; b=R+fWKSybpUALXVyi7dr5ULcwrcaXsKRmDx3orLXnDSP1dKdn6sslxaR84/Vt1idESV R0gbbnc2Eo5O2hvxGNOm5+O5l7zO9r5grwhRC/H1pjlfnAengg/oNlV3PjITQ52N9xvj ttmr00bahnI6zPcHkkGyVH85UyIFb3BiDQXe1wN6D7t4+4SOidckXgXl4WmZtYM9G8g/ aed3/o6NSjZAcWDOvNGsi7PFryJv2kBPX+cLbidK7S7FBT3z2r51EStnpXahSrD5q8Gs bTdzVJmEmNuyfh9W4BKstW6XQcg/tnhQUf9CLonBDa0jnHYmD9BzjVmbUocVwfvlS2tZ ESWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cbb1YDb5NaiuUde42DTRSKAfH6XbrCM5Doeox4W/L1U=; b=q/RiP1vQluQX4/enqhAH/en1JZS4Bfqk8uWFrA+tIHT5ZuVyoxpxWmrhFwMQYChReU 8NA33kjxp1C2Q81mjk8TZg5euRxI0Cj5/Fgl+IziLmXgBSoDH97oUtJ8GGHr4WP4rxp3 RYP481MNNlufjRsnxeLj+7kRL1jcj5F1g4jm/CseBiWvyk0fgy6TflXPk5UkCRETpIh9 rd/drxIiHIGlLd4HnsMS9c+QX8U26Kzcf9y+madg8OiRoyApxptcEw2gGJPPhvTNxorD TdWrXfvr+YpxGzqL34nbA/X7tMRIyRGkS4MjbOh/I9Bg0SyC8gFNNdRgd42hqoxPomQA H1Fw== X-Gm-Message-State: AOAM531b8ujqnwZyomitwe5nf3r/4uBOyt0IKJOEdUkNORZctzIM/H07 kXFNSYItj9BjIlNlYBZR3LmDyx7j2mklVXj0LBqyHg== X-Google-Smtp-Source: ABdhPJwO94bILh3nEx3+nxP4ZO5hEG2ftNGY6x330YGarczURLY5R/Y+L+rCRpLt0Wpji7SMuT9MzVQDZVeugH9nIdA= X-Received: by 2002:a67:de17:0:b0:32a:4007:cd86 with SMTP id q23-20020a67de17000000b0032a4007cd86mr220678vsk.22.1650053900285; Fri, 15 Apr 2022 13:18:20 -0700 (PDT) MIME-Version: 1.0 References: <20220407031525.2368067-1-yuzhao@google.com> <20220407031525.2368067-7-yuzhao@google.com> <20220414143959.0daf4534613f2511b9b27f11@linux-foundation.org> In-Reply-To: From: Yu Zhao Date: Fri, 15 Apr 2022 14:17:43 -0600 Message-ID: Subject: Re: [PATCH v10 06/14] mm: multi-gen LRU: minimal implementation To: Barry Song <21cnbao@gmail.com> Cc: Andrew Morton , Stephen Rothwell , Linux-MM , Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , LAK , Linux Doc Mailing List , LKML , Kernel Page Reclaim v2 , x86 , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_131828_818087_056FE4A9 X-CRM114-Status: GOOD ( 17.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 15, 2022 at 4:16 AM Barry Song <21cnbao@gmail.com> wrote: > > On Fri, Apr 15, 2022 at 9:40 AM Andrew Morton wrote: > > > > On Thu, 14 Apr 2022 14:36:03 -0600 Yu Zhao wrote: > > > > > > or it is only something > > > > meaningful for the internal code? > > > > > > This is how swappiness is interpreted. > > > > > > > if so, can we rename it to > > > > something else? otherwise, it is quite confusing. > > > > > > Feel free to suggest something. > > > > It is confusing, swap_preference? > > seems to be much better. might also be worth using MACRO to replace those > 1, 200, 0 magic numbers to tell readers the exact meaning? How do you read "swap_preference=0"? I read it as "no (swap) preference", which means anon and file are equal. The real meaning though, is "don't swap"; and the "no preference" value is actually 100. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel