From owner-freebsd-hackers Mon Aug 17 13:43:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA15452 for freebsd-hackers-outgoing; Mon, 17 Aug 1998 13:43:20 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bingsun2.cc.binghamton.edu (bingsun2.cc.binghamton.edu [128.226.1.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA15426 for ; Mon, 17 Aug 1998 13:43:15 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun2.cc.binghamton.edu (8.8.7/8.6.9) with SMTP id QAA19990 for ; Mon, 17 Aug 1998 16:42:38 -0400 (EDT) Date: Mon, 17 Aug 1998 16:42:37 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun2 To: hackers Subject: Virtual Memory for buffer Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The virtual memory of buffer is allocated from buffer_map in getnewbuf() by calling vm_map_findspace() and vm_map_insert(). Its address is saved in b_kvasize and (sometimes) b_data. These are fine. However, when allocbuf() extend VMIO buffer size, it *truncates* b_data to a page boundary before entering buffer pages into KVA. I wonder if virtual address space is not always allocated on page boundary, then it is possible that after the PTE has changed to point to our buffer page, those virtual addresses that does not belong to us and yet in the same virtual page could lose their mappings because we truncate the b_data. I hope someone can clarify this for me. Thanks a lot. -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message