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 DBFDBC33CB1 for ; Sat, 18 Jan 2020 15:11:05 +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 419C120661 for ; Sat, 18 Jan 2020 15:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 419C120661 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 1ispk4-0003T7-Sz; Sat, 18 Jan 2020 10:10:28 -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 1ispk2-0003Sv-3s for kernelnewbies@kernelnewbies.org; Sat, 18 Jan 2020 10:10:26 -0500 Received: from mr5.cc.vt.edu (inbound.smtp.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 00IFALuJ010751 for ; Sat, 18 Jan 2020 10:10:24 -0500 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mr5.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 00IFAGn0009523 for ; Sat, 18 Jan 2020 10:10:21 -0500 Received: by mail-qk1-f197.google.com with SMTP id 194so17609229qkh.18 for ; Sat, 18 Jan 2020 07:10:21 -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=wOXTq89LqVBCSm3FhCyWR8vWrkSIGMGvNGFPMrl7KiE=; b=Nsa1Sg9gN7T/QnyW62fqrkxn25tW/IYRS/JUsmGYN5NDGVOeRIC5wgF/g4ARGOwF3A tv6O7+LgVqOBzKFF32RqChpJm+AvxPV3+kr5yQD2JWg1USkzN4+t34HRE90Gu7D26V8i Z/HfqhCBl5l7n9pX+xCFlX6aD6YEqzP7/4piI6crOjgov3aXiQuMvQHIe4lD3V9qrpfq oYUx0vNVMMasHDpn6OCUb0CjkbHy7rZnMFTjPMcozGMDyXdEUjdNRCeISbrUsltnfn9A tL6obAA3i13yUfHNsIJe1Y5HnNqZ84SCtFfAylWBedNvBm4UrerrF8/uFoJuFw13fW0G oi5Q== X-Gm-Message-State: APjAAAWN+WZnRNrl6aeuOp9ppJP+yiVcmuv5tYHPKwbeQLdlUOYFv26s anStTO1IEQPoQkZELVzmDK9SrZzQS0cfZTiZcjra7rydj37+w+3NRIMccKeURBBscaTqjthT4sU yHnr/AXtzzCS0rBRlu41fz2jhZevXI+LQBPKwYes= X-Received: by 2002:ac8:f77:: with SMTP id l52mr12378410qtk.310.1579360216672; Sat, 18 Jan 2020 07:10:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ/doybIiRQ6syggHIO+WjcJsJ/9vve19Xxkie1hn9AKDLvO+cATXLpEvuu/5BVciPWlpHWQ== X-Received: by 2002:ac8:f77:: with SMTP id l52mr12378396qtk.310.1579360216392; Sat, 18 Jan 2020 07:10:16 -0800 (PST) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id k29sm14660119qtu.54.2020.01.18.07.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 07:10:14 -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: Mime-Version: 1.0 Date: Sat, 18 Jan 2020 10:10:14 -0500 Message-ID: <412530.1579360214@turing-police> Cc: Sumit Kumar , kernelnewbies@kernelnewbies.org 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="===============6887520972293900802==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6887520972293900802== Content-Type: multipart/signed; boundary="==_Exmh_1579360213_400155P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1579360213_400155P Content-Type: text/plain; charset=us-ascii On Wed, 15 Jan 2020 18:23:05 +0530, Anupam Kapoor said: > On Wed, 15 Jan 2020 at 6:02 PM Sumit Kumar wrote: > > Does C/C++ provide any API / system call that enables user to force the > > application to transfer some its physical pages to swap disk ? If so, is it > > also possible to obtain the least used page using some API ? > would madvise not serve your needs ? There's this word "force" in the question. The problem is that madvise() is *advice* to the kernel, not a strict guarantee. There's a difference between "If you need to move pages to disk, consider these pages first" and "Move them to disk now, whether you really wanted to or not". --==_Exmh_1579360213_400155P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXiMf1QdmEQWDXROgAQLm5A//SPaMnxw7x6/DVcS5uNKBq8XpjzKu3zqE xhaW7IjXoH1RBX6KjK0F7Ymt5L1Ycm+H5u9EIM7a/LwY45I7emim6626XE+zCQNN 0UBltKBj38ZKRDoaobday1h3Jx6Dt+wKNzLiL+4eOXOr7q9f97LJRQnKcSFii461 04GhFXkqH8oNRNvYS4jdYkIQLqWfdZSnW3SenBPJrQmOIJy8LPfAmtnIMjUaV/79 ILykEWotT/Pw/YX5BI18lTkd6duIETRa5pHX7cq6K+GzKK8cJeyuAmBkkJfnx+pf 0pmm7w+e/1WuZSlReRQN75Vi+U4BIQGpi0I+JR9uz7DFw0cNEr4T5YTp3LEWNFJT q8vzT/Sjdy6/wdv5hETtKG6Q3kWf8bYanjICdiDF5dHtDaOj4YKr0cXZGKT6iBfP i/cRXPpLuS6qIbyyo21utrz5+4+8ogU9IDMGak9g+WXmQsX9g0cw8wgkfwbrHF6f 4dxfdDidB9HQ6JDijOv9Pgpb4m33qJ7O+8mDfirboU1qO0TPao0zAfqgV9dgaemN 3XahQ5l1HzTCxp5x1ymzhaf7rrZTGCXCls/PVPwi6bF5o+bNv6X7K7YlHbfJFuhn VVgZ8pP17ULWh9obwGuNFKbc14u3ednTv7fupjdIsaQ21ldMMlRTbIO28tYZ0/Vj G4YsyFx9YLk= =dJq/ -----END PGP SIGNATURE----- --==_Exmh_1579360213_400155P-- --===============6887520972293900802== 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 --===============6887520972293900802==--