From owner-freebsd-hackers@freebsd.org Mon Oct 12 20:11:21 2015 Return-Path: Delivered-To: freebsd-hackers@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 5F91EA11490 for ; Mon, 12 Oct 2015 20:11:21 +0000 (UTC) (envelope-from gsuryacse7k@gmail.com) Received: from mail-vk0-x234.google.com (mail-vk0-x234.google.com [IPv6:2607:f8b0:400c:c05::234]) (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 1EA60138A for ; Mon, 12 Oct 2015 20:11:21 +0000 (UTC) (envelope-from gsuryacse7k@gmail.com) Received: by vkha6 with SMTP id a6so35328921vkh.2 for ; Mon, 12 Oct 2015 13:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Z1HmQq7lNJavRePwo1jjlS6HQyxRemSqPrfqKCa+p0Y=; b=zBVsAAkCm87eruDTb0vxjAfgj7vLunBUOHFUM/WusVg7KeEti6Ag5IaYKhw65JCLro 8jrK/j4s/k22QzVV289PO0EGajNAQXrFo2BJ5N2FcK6ARi2baBbbW55hqbnfayoAvjY2 m4Sk5ur5ajbRJpoPL553RZlrM6XpQvbafWlUY5xI3CGvrVeXCyA/RIX5yLtVx/EhZBhX iTqwd7GNMOOcRhYdIQVHSc99RU04VVGMfkfSOwzPrk6dfY+SVM6SrKTw5Ci/QvrPZsta lA6Sash2bgyGlWGWMzqL5FcnBfN007cgXft+9bYAhnrI42yfjNN5ENVO4H/qZuSnnOrQ keYw== MIME-Version: 1.0 X-Received: by 10.31.60.145 with SMTP id j139mr19767357vka.89.1444680680026; Mon, 12 Oct 2015 13:11:20 -0700 (PDT) Received: by 10.103.26.3 with HTTP; Mon, 12 Oct 2015 13:11:19 -0700 (PDT) Date: Mon, 12 Oct 2015 16:11:19 -0400 Message-ID: Subject: kernel pages superpage promotion/demotion From: suresh gumpula To: "freebsd-hackers@freebsd.org" X-Mailman-Approved-At: Mon, 12 Oct 2015 20:39:17 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 20:11:21 -0000 Hi, I understand that user space VM map pages dynamically promoted/demoted to super page if the kernel thinks that it gains the performance. The question is , does this apply to kernel map pages too ? And is it possible to write protect kernel address space VA with pmap_protect(9). Since the protection is per 4k page, I see this routine tries to demote to 4k page. Or this is only for user space maps to support mprotect(2) and gdb watchpoints. Do we have any other API to write protect kernel addresses which come from UMA zone allocations ? Could some one with VM expertise please comment on this ? Thanks Suresh