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=2.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,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 CF030C433E0 for ; Sat, 20 Jun 2020 05:35:56 +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 7F6C722250 for ; Sat, 20 Jun 2020 05:35:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dwFfmEzr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F6C722250 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 1jmWA6-0003Ul-Gw; Sat, 20 Jun 2020 01:35:30 -0400 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1jmWA4-0003Uf-UL for Kernelnewbies@kernelnewbies.org; Sat, 20 Jun 2020 01:35:29 -0400 Received: by mail-qv1-xf2d.google.com with SMTP id ec10so5539962qvb.5 for ; Fri, 19 Jun 2020 22:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=9Ym+ifanbNuVZe4AWlZHTtPEP64Q9jTQqmAX8a29zPk=; b=dwFfmEzryOZRfnTJVjeEz60k71ffLjOw9vj2+0Uv8/vWi7EXuEEIjM8iSO1SgPtP25 D4wn4CNA/SsRTs89e41mK6RmVVZvvgAGz2WDt779J/ACrFO1Bqnh8b/YhCoU4AxZtXGE ipVD7Q5NrWzcrvC10EOAMdEisDl6ewkTifa/mJRVxg8G79RAki9rt+anZEOsx9jRdSix h0eGNsL4NNr0PHLvtYQkgNLVdjnjfTqaMHU8P4zzNoNDMdK80jeS3wvoqA7uPzYeurZD re2AmmL6hrCk9dgbkUIFMNLvEq0Q3XmzFLbuJIUiOvubhkG+nJY6ZpqZTZTwaTdhocTT AkZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9Ym+ifanbNuVZe4AWlZHTtPEP64Q9jTQqmAX8a29zPk=; b=lWGLpCaF1jYXMQzZwMsLdf382DRJNNC4XCFEXncd7qLUKPSH3bmYFyIBT+H+KzczYS 2ev38MK5FyKaKAkXn/Z0RnURTHZkhkXZTG5OLevumCFQjZ1Md2892Ofu3JbOYEKiC/9z O3pvuZGg7cjqtMiNGUxLYBPZ0bnfRyAjzdoTQGBM89ln2omGE5dJy2RKIGE5TYjOCuRS Ai/vfHJkvK8Rbok3632xsOXAuYrCHbPTAHGMmHGSvLLjO20Cz7Ul1rrjFGaa5f+8yoYn OGOEe/E00ztUn/VINwEsmCNMJPbz+Z4zBU4JTBWajfH8dyC5z1vb+8y5CgCnM1Pvwiz7 nItg== X-Gm-Message-State: AOAM532MbdUPYRYN6EKsFYBh0yQdeqPM6qIaM0TgnUX6I9S00LZEwXoy QFJlp9OywN3P4CA2mfXDUXoVCZKeWWjqKbnoQY2N/lvkP2KxWQ== X-Google-Smtp-Source: ABdhPJyau5n3Z1qkGxlZbPav12QRRiNMB+EQ/6iqW4sCPqlrg9CwC2f4rsPALJoVaaHxVqdYCotbORwCWVBpOJ0V3fo= X-Received: by 2002:ad4:47b1:: with SMTP id a17mr11958433qvz.16.1592631266429; Fri, 19 Jun 2020 22:34:26 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?5a2Z5LiW6b6ZIHN1bnNoaWxvbmc=?= Date: Sat, 20 Jun 2020 13:34:15 +0800 Message-ID: Subject: What the differences between "__GFP_NOFAIL" and "__GFP_REPEAT"? To: 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="===============9204726398239241173==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============9204726398239241173== Content-Type: multipart/alternative; boundary="000000000000e4d0b105a87d5c3c" --000000000000e4d0b105a87d5c3c Content-Type: text/plain; charset="UTF-8" As per the documentation( https://www.linuxjournal.com/article/6930), which says: Flag Description __GFP_REPEAT The kernel repeats the allocation if it fails. __GFP_NOFAIL The kernel can repeat the allocation. So, both of them may cause the kernel to repeat the allocation operation. How can I choose between them? What are the major differences? Thank you for your attention to this matter. Looking forward to hearing from you. --000000000000e4d0b105a87d5c3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As per the documentation( https://www.linuxjour= nal.com/article/6930),=C2=A0
which says:
=C2=A0 =C2=A0 Flag =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Description
__GFP_RE= PEAT=C2=A0 =C2=A0The kernel repeats the allocation if it fails.
__GFP_NO= FAIL =C2=A0 The kernel can repeat the allocation.=C2=A0

So, bot= h of them may cause the kernel to repeat the allocation operation.=C2=A0
How can I choose between them?
What are the major d= ifferences?

Thank you for your attention to this m= atter.
Looking forward to hearing from you.
--000000000000e4d0b105a87d5c3c-- --===============9204726398239241173== 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 --===============9204726398239241173==--