From owner-freebsd-hackers@freebsd.org Mon Jul 9 06:27:09 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FA571048A6B for ; Mon, 9 Jul 2018 06:27:09 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DBE283C4E for ; Mon, 9 Jul 2018 06:27:09 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: by mail-ed1-f45.google.com with SMTP id b10-v6so12989524edi.2 for ; Sun, 08 Jul 2018 23:27:09 -0700 (PDT) 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=7Zc9VaXqmgbDV/AMr9Y05u84gYLmy6A8uuQWutiu43w=; b=OYCj1ilOHUptTZMuPwcUyYo0uZMf77SmK3f0u2CUN/SFL4TNXNxgvwaBMiEqaLyNp+ D7b2PtkZRXIVCp8WE12CLFNDcI8a7KgJ7pBtu7Y4n6wycO8cWxUWCeAhhWHNRLRjtrPt ZvFeFLr8/7KBzTUOKpFhhiQSUUexEyFZ11AR+iFLh/mIWm42bRBBjkQ/IDPGJaFoOn86 nqU5HS5FW1/BwEbiEJFvymbY+LCM8VjtRUHmXRa5zdQqjbafwM9vZ6jqyJqxOkXC/IIE IQ4iFBQ4otlm6dKj7j9idabVgCZGurq/5aUUJuY8CMIYzxSLmOvDuoVqrczNtc1MlV0D rU/A== X-Gm-Message-State: APt69E1MbJjOK+n3psbpvJESZZaJLS/vlQ73cea+9cDtlaeRPXhTKDl4 iV2ZXFRlZTa/6fkWJ/IyMKrbXXd5 X-Google-Smtp-Source: AAOMgpdeyIaz3RHwO9lsGNkK7lyQxk9vlW4bhdhBNy6cP2oPVxl7uzRC1EQw2DggCclzeNojldx3Mg== X-Received: by 2002:a50:a519:: with SMTP id y25-v6mr21079039edb.105.1531117298559; Sun, 08 Jul 2018 23:21:38 -0700 (PDT) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com. [209.85.208.48]) by smtp.gmail.com with ESMTPSA id z70-v6sm10926567ede.6.2018.07.08.23.21.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 23:21:38 -0700 (PDT) Received: by mail-ed1-f48.google.com with SMTP id u11-v6so12977778eds.10 for ; Sun, 08 Jul 2018 23:21:38 -0700 (PDT) X-Received: by 2002:a50:d313:: with SMTP id g19-v6mr7607773edh.119.1531117298385; Sun, 08 Jul 2018 23:21:38 -0700 (PDT) MIME-Version: 1.0 From: Pratyush Yadav Date: Mon, 9 Jul 2018 11:51:02 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Can contigmalloc(9) fail even when M_NOWAIT is *not* specified? To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 06:27:09 -0000 Hi, The contigmalloc(9) man page says: > The contigmalloc() function does not sleep waiting for memory resources > to be freed up, but instead actively reclaims pages before giving up. > However, unless M_NOWAIT is specified, it may select a page for reclama- > tion that must first be written to backing storage, causing it to sleep. So if M_NOWAIT is *not* specified, can contigmalloc() "give up", and return NULL? -- Regards, Pratyush Yadav