From owner-svn-src-all@freebsd.org Mon Sep 18 13:24:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E95FE10095; Mon, 18 Sep 2017 13:24:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEE9A68610; Mon, 18 Sep 2017 13:24:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IDO0cU056221; Mon, 18 Sep 2017 13:24:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IDNxB6056215; Mon, 18 Sep 2017 13:23:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709181323.v8IDNxB6056215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Sep 2017 13:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323704 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 323704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 13:24:01 -0000 Author: hselasky Date: Mon Sep 18 13:23:59 2017 New Revision: 323704 URL: https://svnweb.freebsd.org/changeset/base/323704 Log: Only wire pages in the LinuxKPI instead of holding and wiring them. This prevents the page daemon from regularly scanning the held pages. Suggested by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 18 13:17:23 2017 (r323703) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 18 13:23:59 2017 (r323704) @@ -220,7 +220,6 @@ static inline void get_page(struct vm_page *page) { vm_page_lock(page); - vm_page_hold(page); vm_page_wire(page); vm_page_unlock(page); } @@ -245,7 +244,6 @@ put_page(struct vm_page *page) { vm_page_lock(page); vm_page_unwire(page, PQ_ACTIVE); - vm_page_unhold(page); vm_page_unlock(page); } Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 13:17:23 2017 (r323703) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 13:23:59 2017 (r323704) @@ -209,6 +209,7 @@ linux_get_user_pages_internal(vm_map_t map, unsigned l vm_page_lock(pg); vm_page_wire(pg); + vm_page_unhold(pg); vm_page_unlock(pg); } return (nr_pages); @@ -243,6 +244,7 @@ __get_user_pages_fast(unsigned long start, int nr_page vm_page_lock(*mp); vm_page_wire(*mp); + vm_page_unhold(*mp); vm_page_unlock(*mp); if ((prot & VM_PROT_WRITE) != 0 && @@ -323,9 +325,6 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int } vm_page_xunbusy(page); } - vm_page_lock(page); - vm_page_hold(page); - vm_page_unlock(page); VM_OBJECT_WUNLOCK(obj); return (page); }