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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 937FDC43381 for ; Mon, 18 Mar 2019 18:01:45 +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 5539F20863 for ; Mon, 18 Mar 2019 18:01:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5539F20863 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1h5wZF-0008Uo-5I; Mon, 18 Mar 2019 14:00:57 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h5wZD-0008Ug-Fp; Mon, 18 Mar 2019 14:00:55 -0400 Message-ID: <277f9c691ea8922b2e50ee49c02cebdb2c344c50.camel@surriel.com> Subject: Re: vmalloc_to_page is contiguous ? From: Rik van Riel To: Ranran , kernelnewbies Date: Mon, 18 Mar 2019 14:00:51 -0400 In-Reply-To: References: X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 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="===============2012826524935901540==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============2012826524935901540== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-6pmCyq60HCkOn+SH32O0" --=-6pmCyq60HCkOn+SH32O0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2019-03-18 at 12:55 +0200, Ranran wrote: > Hello, >=20 > Does vmalloc_to_page() returns contiguous physical memory ? > I ask becuase I see that its return value is used for DMA and DMA > uses > contiguous memory. > see here: >=20 https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/onenand/sam= sung.c#L657 > Yet, in vmalloc_to_page implementation: > https://elixir.bootlin.com/linux/v4.5/source/mm/vmalloc.c#L234 > it does not seem that it creates a contiguous allocation. That is correct, vmalloc_to_page does not create anything. All it does is find (and return) the page address of a single vmalloc address. If you have a vmalloc buffer larger than PAGE_SIZE, you will have to call vmalloc_to_page to find each individual page. --=20 All Rights Reversed. --=-6pmCyq60HCkOn+SH32O0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAlyP3NQACgkQznnekoTE 3oNSLQgAmG9pOtZyaZ6B3A8OmR7sY8VNPq/LpsZe7fhMTa3rNyPkFUYAlX3ShDmy PBe6njq3isVeLogo8I9dJCH/3U4QIYPaYDBtbfrIUxnYhEWciHqEv4u6ME3PFWvF 5uwM7JgGA6e5FPjGzOe3O2qrfBgZ/2iEe7QDcIK4eRKY+TyD9Gmuv/XhCyxQBf/1 pkdhmXAt/NRTkABzcTiSctRcpIl9cJZvsmJyBFb+dschhyz68jKRIn/AwXW8L2TL +kvLt/9gCp2blLVLdZ8hNkitPItL0mw5BOorD94bjlkBXMN8CbL5AZPNoKgjmCse fZ4t4ns2E6EcQTXc/bxhYacDJ8QRBg== =WHlc -----END PGP SIGNATURE----- --=-6pmCyq60HCkOn+SH32O0-- --===============2012826524935901540== 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 --===============2012826524935901540==--