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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 46C7CC433E0 for ; Sat, 20 Jun 2020 09:13:29 +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 007A523A6B for ; Sat, 20 Jun 2020 09:13:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 007A523A6B 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=archiver.kernel.org@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jmZZ0-0007Hj-V4 for kernelnewbies@archiver.kernel.org; Sat, 20 Jun 2020 05:13:26 -0400 Received: from omr1.cc.ipv6.vt.edu ([2607:b400:92:8300:0:c6:2117:b0e] helo=omr1.cc.vt.edu) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jmZX9-0005lF-8X for Kernelnewbies@kernelnewbies.org; Sat, 20 Jun 2020 05:11:31 -0400 Received: from mr4.cc.vt.edu (inbound.smtp.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 05K9BTUO029670 for ; Sat, 20 Jun 2020 05:11:30 -0400 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mr4.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 05K9BND1013472 for ; Sat, 20 Jun 2020 05:11:29 -0400 Received: by mail-qv1-f69.google.com with SMTP id w3so8720269qvl.9 for ; Sat, 20 Jun 2020 02:11:29 -0700 (PDT) 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=BNz+EuSscWBJTc17pciV9UYqHS5j5X3N+mSU2ELDEpA=; b=ti/WfXDiilCL9Fw93iSWZuT9tSy6pprc8CMndnQJOE6oOLnDfzLSsM6JYzjED3oKcu 6naniXvATxrE4ijdBxHeBduSXHQ2U2Iqxihr2/TFlQABz4MpvbLQLSoKuC737zk35BTz 1f6WLLhYFLuygWUokPYlCRMndbki/frBfaSAgWWuCF+jimWAQoAdp/KGNAyh7/0knIEN 17NE84M0vQpqieyFoa7UTMFxtQwz3tVs6jvl6ZECdA3yhTbRr+kR9Gc0sDVIVVfrYR9w GDbrTT/csNi/SlfMlSX/LsNqNgF9k1HpILjBxYxqoheOICjbod49bqB00y2W2BHhRCLb Pbgw== X-Gm-Message-State: AOAM531wKiBmHLjcsQpSM4fWGQH7pS8qr/tbIQl9GanSHHj79bbxsZHq z49S1cVueU7yMNYBrnbxwXETeFFh317gIeno9KSdnyma2fkOjZjOM2AE/O/C2ME/r+scF6DZ9Z1 EjQ+THcnnfw6WYvk/KALZIz55KBDyrA/+Yr9VyF0= X-Received: by 2002:ac8:260b:: with SMTP id u11mr7239548qtu.380.1592644283774; Sat, 20 Jun 2020 02:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCeo8U9nsdjFk1/u/acFK/if6ikb2vzHxHkiYoTP1MUDQjbrdC75maXl1pDLbBW2rGa+Vscg== X-Received: by 2002:ac8:260b:: with SMTP id u11mr7239531qtu.380.1592644283436; Sat, 20 Jun 2020 02:11:23 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with UTF8SMTPSA id 205sm8891437qkh.94.2020.06.20.02.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 02:11:22 -0700 (PDT) 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: 孙世龙 sunshilong Subject: Re: How do you comprehend the saying that the kernel's memory is not pageable whereas get_free_page use a page-oriented technique? In-Reply-To: References: Mime-Version: 1.0 Date: Sat, 20 Jun 2020 05:11:21 -0400 Message-ID: <546231.1592644281@turing-police> Cc: 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="===============4855242722033584184==" Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org --===============4855242722033584184== Content-Type: multipart/signed; boundary="==_Exmh_1592644281_62491P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1592644281_62491P Content-Type: text/plain; charset=us-ascii On Sat, 20 Jun 2020 14:18:21 +0800, 孙世龙 sunshilong said: > Unfortunately for kernel developers, allocating memory in the kernel > is not as simple as allocating memory in userspace. A number of > factors contribute to the complication, among them: > The kernel is limited to about 1GB of virtual and physical memory. > **The kernel's memory is not pageable.** > If a module needs to allocate big chunks of memory, it is usually > better to use a page-oriented technique. Due to memory fragmentation, if a module needs (say) 2M of memory for an I/O buffer, it's more likely to be able to allocate 512 4K pages scattered through the 1GB of memory than it is to get 1 contiguous chunk of memory. The fact it's not pageable doesn't mean that pages aren't relevant as the unit of allocation. --==_Exmh_1592644281_62491P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXu3SuAdmEQWDXROgAQKLsRAAkuWzqINeFhgsRkJgGC5WpuTzZTsi96Wo T1l8V1OVjHstLRKOro1ROHoXxUZcNE06X8ogn7Ih+apxxBcJGmeTExl+A9OcWg85 gVt4utvHRkTu/XZeP9pZ4Xxrfb8L9pOchWPrDzWze2lQ49cAw0tt5lnea9HxA4Go 3k9En1rU8+9DxfrJumbfC9EJ78PPjM9sT6wsBiy1ts2fRqfV6VxmoqpkfWDwAwlR IXoJVHacGXarVvhBK5AgLYg0oEbuwzD+l36C0SgIP5zEe/dBDoXGu28lRi7eaq7j VY9GPY/y1UU6jl+zu0stCng3TSq0CeXEN7uaKdg1EYmMLe0xDnCw/dGrBwdzWhDi d1CvxwFsIzFamMeFRxHcUewq6n8QdTWjGzysHsHAQZVGsg5Zu3OOHnEJwIq5doPT zjfUSQZ6D1oTiWS2fFf54bvk+ds3ZP5UTZesAQgYrEls+VgGNvISNYHPJCffKe7s 6hx8XoS/FbIOwEqojLEOTMq+vkkZIUvgNgWL05JoctkrwnMlZBExS40LfrTSTU9n IrfQ+jdo4e4PMF/THDria+l9PfCCjomASKnKMWRfW6jXZoIpdrLBjl+A8Rw0TDmB lxDwFG9tjI9fIZsWARvYUu50wpjvEaKsnMWRW9lNBb6FK+UumcdQ4Kp07jLtHNe9 9XdrjFOdtLw= =RJ8T -----END PGP SIGNATURE----- --==_Exmh_1592644281_62491P-- --===============4855242722033584184== 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 --===============4855242722033584184==--