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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,SUBJECT_NEEDS_ENCODING, SUBJ_ILLEGAL_CHARS,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 05C2AC433DF for ; Fri, 19 Jun 2020 04:48:54 +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 C7F44208C7 for ; Fri, 19 Jun 2020 04:48:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7F44208C7 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.94) (envelope-from ) id 1jm8xJ-000401-Ha; Fri, 19 Jun 2020 00:48:45 -0400 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 (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jm8xH-0003zw-Rb for Kernelnewbies@kernelnewbies.org; Fri, 19 Jun 2020 00:48:43 -0400 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 05J4mhVA014391 for ; Fri, 19 Jun 2020 00:48:43 -0400 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 05J4mcgc006006 for ; Fri, 19 Jun 2020 00:48:43 -0400 Received: by mail-qk1-f200.google.com with SMTP id l184so6256438qkb.2 for ; Thu, 18 Jun 2020 21:48:43 -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=TFRmaS03UsvbVykoz5aP34O6IZdfRM41yXFX4GB4/Ks=; b=aKWABG7TpBDY7AoWUW7g3pTV+Tx2hr5UqF0qdfiTsF3qwTOIxByhrTaNkh3Paf2FS2 rSrVo2kL/d8EVNcL5nXE5YMplzcikiNbmkG6tQG3e+f6umheUpe5Gfj5bU9uYB0cp1zq DIiySIRzC1MLZg+Mz64ZOSGJgaZS6SBSI6OMOGqcMvil/OXerAmsm2NqTeRK53E3t6vc RF7uZyyf5TgsXWYfidnbZ4COMpTFc9OY3OKCWFL0ppGxIpKECxb2W5rsn4XTasG4WPOS 31JTACpRxaBvVZ8/LvV/xL8AJpGom7GPlXZTKsWtH9iJJWSGM1fIa5v9sOhodCyPoId3 XNkw== X-Gm-Message-State: AOAM532ugc7rhIG63S01LGog0TGnI73QHG5vNb8LPeT16TWbEHn/7GWf MKh0LF/ZoG3xMlLCLDHIQX249Or32AXG0rTZCAjYIgmPR5tbxlsdmVlFlq0nVaftoGw0Dr6h4el q0/gt8erp9pwM3MaupZMV107CvKz+/FylAdGDGKQ= X-Received: by 2002:a37:588:: with SMTP id 130mr1766428qkf.209.1592542117762; Thu, 18 Jun 2020 21:48:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsE+odhMpKo4EWQVIJ2UOKMDWx3g/HxuvhkVV2At8K72T5HCGZSpo61QxV6dma/O2pNx4tmw== X-Received: by 2002:a37:588:: with SMTP id 130mr1766417qkf.209.1592542117488; Thu, 18 Jun 2020 21:48:37 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with UTF8SMTPSA id c201sm5410644qkg.57.2020.06.18.21.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 21:48:36 -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: 孙世龙 Subject: Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used? In-Reply-To: References: Mime-Version: 1.0 Date: Fri, 19 Jun 2020 00:48:35 -0400 Message-ID: <459330.1592542115@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="===============2611495918438993088==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============2611495918438993088== Content-Type: multipart/signed; boundary="==_Exmh_1592542115_62491P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1592542115_62491P Content-Type: text/plain; charset=us-ascii On Thu, 18 Jun 2020 14:21:05 +0800, 孙世龙 said: > Why does "page allocation failure" occur whereas there are still "58*4096kB > (C)"(*I think it indicates there are 58 order 10 memory could be used*) > could be used? > > Here is the related log: > > [ 2161.623563] xxxx: page allocation failure: order:10, > mode:0x2084020(GFP_ATOMIC|__GFP_COMP) Most likely, the allocation wanted some other type of allocation. The (C) on the order-10 says it's an CMA area. static const char types[MIGRATE_TYPES] = { [MIGRATE_UNMOVABLE] = 'U', [MIGRATE_MOVABLE] = 'M', [MIGRATE_RECLAIMABLE] = 'E', [MIGRATE_HIGHATOMIC] = 'H', #ifdef CONFIG_CMA [MIGRATE_CMA] = 'C', #endif #ifdef CONFIG_MEMORY_ISOLATION [MIGRATE_ISOLATE] = 'I', #endif If the call was for an unmovable, movable, reclaimable, or highatomic allocation, you lose. If you look at the source for alloc_ap_req(), you find it wants GFP_ATOMIC, not CMA. And your box is fresh out of contiguous order-10 spaces that aren't CMA, and you're down to your last 3 order-9 flagged as (UEC). I admit I find it a tad suspicious that the USB gadget driver asks for a 4M chunk of memory. Does USB actually support single transfers that large? (I'm not a USB expert) --==_Exmh_1592542115_62491P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXuxDogdmEQWDXROgAQJX5Q/+LYIg6rxBJD7ShFFqOoOVPoCfVYF22ETv rQy2tiquhWTgpmpp6tk+7ge8NCjEm+Xg7KrXaXHrQ9sJY367Y4UjdrBMHC1Xz+Ei RUUfd18xKX7t/t8S7Eu/Sbnu9SYrhNTLE1UeOcRGlBkkF+ffiUALU4MwHEuPwGVy CBboMWOo3aO1THtjIQ70bwgQLDBEaUFos4BQVS191/0hcGqrXzbMA9k4rgVhNVAT OQMYqV/CZPf0SWtxS5D/cMPdBqg3ehIBgJzi16Wxnpl29g/xwrEyz9gwhduq9GsP 1+0fpn6XqJ1IA/DsQFPcrvqT80AwcZii15Ql+VDTv9JsYA5e5jxzM2Ls1c04CkzN u8H7TgQaQyHlf+T4uptfuwbIa+Uh+nA+UaAHcg8fSFvXb+pEVHbOZO2hkI579QiL Ap5rUOJ4P9lnrIIUIagXxJEu3MemeTjnhSMHaqJws1MTgB7WtaUlxevlyUjXwW85 ABLcKrOc3g4ewfPJXZLofERc9MSShOyeo+YNMcy/OfwkrAiXsJFQa0uNNIYooabj QBqRrUP+dcT4wG3HRAbbeKgGkMJ6BDTsu6o87D5kezm8rbvlCqK946y36h3wpsCt msaSOhZ3Dv6TU/7nY3Bwroazfcun+zxwn9C7/0uwa2GIJOhJc1jnXChEGsiZwpEd TWfSOUgyMdk= =f7Il -----END PGP SIGNATURE----- --==_Exmh_1592542115_62491P-- --===============2611495918438993088== 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 --===============2611495918438993088==--