From nobody Fri Sep 16 22:41:19 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MTpvy2WtRz4cKQ2 for ; Fri, 16 Sep 2022 22:41:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MTpvy0Tjnz3mMb for ; Fri, 16 Sep 2022 22:41:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 28GMfJur088375 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 17 Sep 2022 01:41:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 28GMfJDs088374; Sat, 17 Sep 2022 01:41:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 17 Sep 2022 01:41:19 +0300 From: Konstantin Belousov To: Mark Millard Cc: dev-commits-src-main@freebsd.org Subject: Re: git: 87384c51e047 - main - jemalloc: use symbolic definitions for bits in vm_overcommit when !defined(SWAP_RESERVE_FORCE_ON): lacks a return statement Message-ID: References: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on tom.home X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MTpvy0Tjnz3mMb X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Fri, Sep 16, 2022 at 02:00:36PM -0700, Mark Millard wrote: > Konstantin Belousov wrote on > Date: Fri, 16 Sep 2022 20:25:35 UTC : > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=87384c51e047349fdbcf4f07fe52d900ce108040 > > > > commit 87384c51e047349fdbcf4f07fe52d900ce108040 > > Author: Konstantin Belousov > > AuthorDate: 2022-09-15 09:59:42 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2022-09-16 20:23:19 +0000 > > > > jemalloc: use symbolic definitions for bits in vm_overcommit > > > > Reviewed by: brooks, imp (previous version) > > Discussed with: markj > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > Differential revision: https://reviews.freebsd.org/D36540 > > --- > > contrib/jemalloc/src/pages.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c > > index 13de27a0087d..3600443e2cb5 100644 > > --- a/contrib/jemalloc/src/pages.c > > +++ b/contrib/jemalloc/src/pages.c > > @@ -12,6 +12,7 @@ > > #include > > #ifdef __FreeBSD__ > > #include > > +#include > > #endif > > #endif > > > > @@ -455,7 +456,10 @@ os_overcommits_sysctl(void) { > > } > > #endif > > > > - return ((vm_overcommit & 0x3) == 0); > > +#ifdef SWAP_RESERVE_FORCE_ON > > + return ((vm_overcommit & (SWAP_RESERVE_FORCE_ON | > > + SWAP_RESERVE_RLIMIT_ON)) == 0); > > +#endif > > } > > #endif > > > > It looks like the above: > > +#ifdef SWAP_RESERVE_FORCE_ON > + return ((vm_overcommit & (SWAP_RESERVE_FORCE_ON | > + SWAP_RESERVE_RLIMIT_ON)) == 0); > +#endif > > means that there is a path through the routine that does not > execute a return . . . ; statment when > !defined(SWAP_RESERVE_FORCE_ON) . > > (Otherwise the #ifdef and #endif would not be necessary.) I fixed this in 0e2af3b59a15, thanks.