From nobody Fri Sep 13 04:43:33 2024 X-Original-To: dev-commits-src-all@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 4X4hX55cmsz5WGfN; Fri, 13 Sep 2024 04:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4hX553v7z44gt; Fri, 13 Sep 2024 04:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726202613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8bIQvcK4Fy0CVJc/Gj/axLj1T13JdAIen08o206z3Mk=; b=Y/bpgYAPbbyI7DxRJ/1JRVWWDM5qkn6U9oEKLcnqas9ZAgzHsVhOOk5oyRieAKqdiRVbz2 E+5nrL91DAi9IZQTD+EKBNvjyfQUZc+PmE1s3ExWLPTRxYlyIiLxtZOXjAzS4+RXlL3tG3 yoocYrubmoht3L+kFtAOcAXwwP4j1LLIbCu4rhrV5VQ00JUJSrWPC6Snfe21bSNckcq0L6 svrhD3u3qNQvCx2XXL5ykTFhxWNPfjpJ01ZSLlKOoI4gsXJYzXFgw9BMMZvxXTf+DKHw2f f2lBAeBUxDA57+2P+yqP3zFxw6hSBEQZAybPqZWpS4i17CO6Z/SrJJhc+HAWzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726202613; a=rsa-sha256; cv=none; b=PDc7weqi0MWcgV8HWjl9/muHljzPuRCipwVoIsAIdW63V4VGRWh5DxE4Uf46n4hqKKJ19T Kk8WwIeYGLedUa6ksxulJrbeEipAoff/ddATtIerqYNqwzFeJnK9/eaFr+1PHncv13C0gd fSEGh1PbBSYK6jC4AAU0ptOeUKrnk4fSSojYV9BG7iNvQNmqqA+2mBfnXbqmHov+cUsP29 bcQe513+52W4xjVEjrKe6ACYH8ItjENBDSXqqrlowhk+7KlhugYEHbzHRXOHHDcK/zPMYk 3Awwst0JlouiT0dcRic9wFU1cCqQZpwp2JtmJq+Tg7Gqj5fXDP7cK2GVnY2f8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726202613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8bIQvcK4Fy0CVJc/Gj/axLj1T13JdAIen08o206z3Mk=; b=xyasESUY64RTHzm8HuDv2Ww2sX6CPrOifHJQtyRrnJHxVA6s0fZLQ42GT0i+8zFmjbqJRB pDIFJ2nOFF5O7vxRDAKzZNkv2pgWyo7mvQ8uqNUeDJQS7CcvezWU7IC2fJ2tPnmuIiENhM 6l80LWQp5y3zxbQAZTDdShH2PPv9TMC2SfwfmutbI2ekWeWgp/ZUKNpYxg93uQu5dcYjDD GHLqz+eAPmGuCLGGRUDsqJfJPBp01ir2k6kKltwKMYen+5T+POYshzlRlA4sNSBiDkzQvm HU+vnMNRjFo2huM97oLhYzjWtZTbVF+FW78R5XYAFRnjnt+2RbKRfMflk4CpXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X4hX54gWTzT4C; Fri, 13 Sep 2024 04:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48D4hX0C098012; Fri, 13 Sep 2024 04:43:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48D4hXTh098009; Fri, 13 Sep 2024 04:43:33 GMT (envelope-from git) Date: Fri, 13 Sep 2024 04:43:33 GMT Message-Id: <202409130443.48D4hXTh098009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 4876924c0c57 - main - vm_page: fuse two allocation loops List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4876924c0c57c2255a0e4c254b4054e029e3d884 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=4876924c0c57c2255a0e4c254b4054e029e3d884 commit 4876924c0c57c2255a0e4c254b4054e029e3d884 Author: Doug Moore AuthorDate: 2024-09-13 04:41:01 +0000 Commit: Doug Moore CommitDate: 2024-09-13 04:41:01 +0000 vm_page: fuse two allocation loops Combine two loops, each iterating over the same array of pages to initialize them, into a single loop. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46609 --- sys/vm/vm_page.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0f41ea5a6bb5..d21cc38f5e39 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2352,10 +2352,6 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, if (!vm_domain_alloc_fail(VM_DOMAIN(domain), object, req)) return (NULL); } - for (m = m_ret; m < &m_ret[npages]; m++) { - vm_page_dequeue(m); - vm_page_alloc_check(m); - } /* * Initialize the pages. Only the PG_ZERO flag is inherited. @@ -2376,6 +2372,8 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, memattr == VM_MEMATTR_DEFAULT) memattr = object->memattr; for (m = m_ret; m < &m_ret[npages]; m++) { + vm_page_dequeue(m); + vm_page_alloc_check(m); m->a.flags = 0; m->flags = (m->flags | PG_NODUMP) & flags; m->busy_lock = busy_lock;