From owner-freebsd-hackers@freebsd.org Mon Jul 9 08:14:13 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 3ED67102DE86 for ; Mon, 9 Jul 2018 08:14:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (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 C7EE189DC2; Mon, 9 Jul 2018 08:14:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id v26-v6so16265778iog.5; Mon, 09 Jul 2018 01:14:12 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=klVzZ0iGQJ4eidlsqXXhSKgbAcGmN9PteWNj34IzgxE=; b=jqIIHY9fRh2MTOg9DsClxAFkIKUxc9XF4EWA6WsUais+Zs/JCNH+W2WwQWLCENuhoj x7MidctOKRTEKobehc5bU3rzu30XBgqm9bGx/DEd/IsMKN3vzGDKytMXpdyEB1Qdrqcp ttHDDYaFZI8O2RS2gW4HokBlx6SnbY2cKpv8VUVDVw+I9xMvTg0OGpLMMyDKP67q1ImW ZNxswDnsonJ8baZMkRz9kpfkI9d69Q1O+CfouQJFELsiSDStzWHqhCjnQYsp+wvMbZXF fWIbenr4se/QiJEOPZFmH4yboFQH1Sl1Dwz1ypzTwX6Qv7x7rYpi0S6SUiyihRjp/oFx bRnQ== X-Gm-Message-State: APt69E26hMMQs8lmDyNkZ9aesNwIWp+poa4AuynkWxBcpqAAPWU1vZML IEGC7bM5ymXntdJ3xVAZftm8ZUnH X-Google-Smtp-Source: AAOMgpc36yrjtmQSo3OLeHc7SmniPSdO+3ZRkd6pxqAlfoCMw9vQojq5Eb3Of8nChB8CYAMv0zlnmg== X-Received: by 2002:a6b:ea05:: with SMTP id m5-v6mr17072314ioc.33.1531118636061; Sun, 08 Jul 2018 23:43:56 -0700 (PDT) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com. [209.85.214.53]) by smtp.gmail.com with ESMTPSA id x201-v6sm8293253itb.12.2018.07.08.23.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 23:43:55 -0700 (PDT) Received: by mail-it0-f53.google.com with SMTP id l16-v6so24953876ita.0; Sun, 08 Jul 2018 23:43:55 -0700 (PDT) X-Received: by 2002:a02:10c6:: with SMTP id 189-v6mr9059806jay.54.1531118635837; Sun, 08 Jul 2018 23:43:55 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Sun, 8 Jul 2018 23:43:55 -0700 (PDT) In-Reply-To: References: From: Conrad Meyer Date: Sun, 8 Jul 2018 23:43:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Can contigmalloc(9) fail even when M_NOWAIT is *not* specified? To: Pratyush Yadav Cc: "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 08:14:13 -0000 Yes. On Sun, Jul 8, 2018 at 11:21 PM, Pratyush Yadav wrote: > 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 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"