Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2008 19:32:48 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/vm vm_mmap.c
Message-ID:  <200805171932.m4HJWmc3013992@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
alc         2008-05-17 19:32:48 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               vm_mmap.c 
  Log:
  In order to map device memory using superpages, mmap(2) must find a
  superpage-aligned virtual address for the mapping.  Revision 1.65
  implemented an overly simplistic and generally ineffectual method for
  finding a superpage-aligned virtual address.  Specifically, it rounds
  the virtual address corresponding to the end of the data segment up to
  the next superpage-aligned virtual address.  If this virtual address
  is unallocated, then the device will be mapped using superpages.
  Unfortunately, in modern times, where applications like the X server
  dynamically load much of their code, this virtual address is already
  allocated.  In such cases, mmap(2) simply uses the first available
  virtual address, which is not necessarily superpage aligned.
  
  This revision changes mmap(2) to use a more robust method,
  specifically, the VMFS_ALIGNED_SPACE option that is now implemented by
  vm_map_find().
  
  Revision  Changes    Path
  1.220     +3 -5      src/sys/vm/vm_mmap.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805171932.m4HJWmc3013992>