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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAEF7C33CB1 for ; Sun, 19 Jan 2020 13:19:25 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78027206D7 for ; Sun, 19 Jan 2020 13:19:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78027206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1itATk-0006sN-Bq; Sun, 19 Jan 2020 08:19:00 -0500 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1itATi-0006sG-Bz for kernelnewbies@kernelnewbies.org; Sun, 19 Jan 2020 08:18:58 -0500 Received: from mr1.cc.vt.edu (mr1.cc.vt.edu [IPv6:2607:b400:92:8300:0:31:1732:8aa4]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 00JDIuZJ008960 for ; Sun, 19 Jan 2020 08:18:57 -0500 Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 00JDIoDa025740 for ; Sun, 19 Jan 2020 08:18:55 -0500 Received: by mail-qv1-f71.google.com with SMTP id z12so19250717qvk.14 for ; Sun, 19 Jan 2020 05:18:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=65Yi69GphclowTlFmf56kixtcQkkqSeRN5M9FFkVMnc=; b=E+9Ag+f88HFfyLTB1FbzC+qUOhncdUzafATTaIvU74vl3+6JTGjkGMc7nq9QMDgQYr +UeNVPvAEawoeqeIUJS7c07EPIS+f7ZZkRWYSzDFENncAU4HiCT0M7Awl5kJsLqM6zqY nkEHtOOnQqSrGWGnD/nXJPihU/YqyzCfKWno+4V6Lg3H89KA+VWd7pOBL5L5zd8DXaQU kslMchr5RucFk+cctxyLFOxsUM61Aza/j5SA/+DN6qoI0EgW9yJ67eFKueEoFpGab8ZK u05aWC0zu1UI5JaeUxf9HvRcpJRXl9NdceWlvNrhl0HEcKrurtx0V/gBNkfETT4AD85b 1f0g== X-Gm-Message-State: APjAAAUBsbh4kcykFBA1z4oK9fTGnyUax2YJwsgGPHIB8gKVRU1864Au 0XAtcIbjIW0S1ENS8B6E4zyKCVn7ur/Cg1UUtBbwxYv0TZaboVXBdcbAiQDnbCDJpzF9UrByUC/ XRvNH5SCurnq2vQFOb26HPNDVivOXfoYwMOKS7kA= X-Received: by 2002:a0c:e58a:: with SMTP id t10mr16374104qvm.161.1579439930694; Sun, 19 Jan 2020 05:18:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwlhWGGnF+MJ8AP6ENYlySlDO0JF4pOZ9B3rh0AZXQg/OCThgrpoH5o6U2Fu2amoEOpmkRv1Q== X-Received: by 2002:a0c:e58a:: with SMTP id t10mr16374088qvm.161.1579439930383; Sun, 19 Jan 2020 05:18:50 -0800 (PST) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id a24sm14388518qkl.82.2020.01.19.05.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jan 2020 05:18:48 -0800 (PST) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Anupam Kapoor Subject: Re: transfer physical memory page to swap disk In-Reply-To: References: <412530.1579360214@turing-police> <494631.1579432452@turing-police> Mime-Version: 1.0 Date: Sun, 19 Jan 2020 08:18:47 -0500 Message-ID: <504953.1579439927@turing-police> Cc: Sumit Kumar , kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8386972406797153330==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============8386972406797153330== Content-Type: multipart/signed; boundary="==_Exmh_1579439927_400155P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1579439927_400155P Content-Type: text/plain; charset=us-ascii On Sun, 19 Jan 2020 12:45:57 +0000, Anupam Kapoor said: > > Note that in this case, "naively" includes "not remembering to consider > > that the page being unmapped may have contained data we'd rather > > have kept by flushing the page to disk" :) > > but is it that bad ? > > before marking a page unmappable, the application has full control > over what it wants to do with the data, and can choose to dump it > to the appropriate destination. Yes, but now you're getting into more code that has to be written, including code to marshal things like binary trees into a savable format, and more code to read them back at a later time. Plus all the fun if the tree has hundreds of thousands or millions of entries, and how to deal with it if some parts of the tree have been released and saved to disk, or if the 4K page contained members of several different data structures - in other words, you probably just decided to write your own backing store, garbage collector, and virtual object manager for your heap. As I said - it's a naive approach that ends up following the 90/10 rule: the easy 90% of it takes the first 90% of the time to code it, and the difficult 10% takes the other 90% of the time... :) --==_Exmh_1579439927_400155P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXiRXNwdmEQWDXROgAQKBlw/+LVUQ6PVUYymluxmZt3z5Fai8yPvgw3EJ M0zBBgo04DOWgevf9n79A0d+5HSXKhtV5NPLEmEn5MSftLyEOVDtprwnzLDGTcli WqU+NUJWjznzyulFJpjUb0s9B6gsEhZqDWBX9OIRpq251+NtoOfWEHJtGOM0I5jq zVAllMU2Ory5gdzkBjERwEJecQ3Cysbzuf1o2/J+XJJzaIIgRoVXC9+NXqi6vgBX qYr82AMYfdUp9rC4vr3JB4BigYtUbzxH4msv9MQmA6dBKMqWv/3z3s476qobhSni X/SDslL9TVHS6eyRQ0yI5H9L3rZQcVqTpdqJob/Lh4oXfBAgHnzvEd6tqVoXqBH2 nO1TYlcvDZaJcrkRksM+a6e5Sm5YQnJYTYHBwdiL6NvLhfwylA080LVZpMEJNHus KCrRF96CJS8oq2wPRsTn3ksDP4ymG5J8RvlN7APH2rXvLWRJftNH9AxPxVwT5KVQ hTS2ff8C5LCEc/6QfcUfFqyipbmxD6Upga76Nrdb8Wiv4fIsx9nhaun5f6aQXfD7 w5LsReJT29D9SxdmItziUW5KScuqn0XCIuUTMsOOr22tBKVaHbVr/nfbboa74alp xpOyPwvD2gpPtC3B8p9BXHMZmsoAS+y6OsSyuRMnjmGgi3a/+GoKI8yCxcXlV+iP AltDvM0W/10= =6tDA -----END PGP SIGNATURE----- --==_Exmh_1579439927_400155P-- --===============8386972406797153330== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============8386972406797153330==--