Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 14:58:54 +0400
From:      Andrey Zonov <zont@FreeBSD.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: [patch] unprivileged mlock(2)
Message-ID:  <503F476E.1010505@FreeBSD.org>
In-Reply-To: <503F2D24.8050103@FreeBSD.org>
References:  <503DD433.2030108@FreeBSD.org> <201208290906.q7T96C9j032802@gw.catspoiler.org> <20120829092318.GW33100@deviant.kiev.zoral.com.ua> <503F2D24.8050103@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig6E4239DCB20C1E641CC3E0B6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 8/30/12 1:06 PM, Andrey Zonov wrote:
> Hi,
>=20
> So, I've got the first version of the patch (attached) which fixes
> memory locked limit checking and accounting.
>=20
> I also want to change 'pmap_wired_count(vm_map_pmap(map))' with
> 'vmspace_wired_count(vmspace)'

It's here [1].

> Index: sys/vm/vm_mmap.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- sys/vm/vm_mmap.c	(revision 239611)
> +++ sys/vm/vm_mmap.c	(working copy)
> @@ -1483,11 +1483,13 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_siz=
e_t
>  			PROC_UNLOCK(td->td_proc);
>  			return (ENOMEM);
>  		}
> +#ifdef RACCT
>  		if (racct_set(td->td_proc, RACCT_VMEM, map->size + size)) {
>  			PROC_UNLOCK(td->td_proc);
>  			return (ENOMEM);
>  		}
>  		PROC_UNLOCK(td->td_proc);
> +#endif
>  	}
>=20
>  	/*
>=20

I put '#endif' in the wrong place, corrected patch is here [2].

[1] http://people.freebsd.org/~zont/vm_mmap.c.patch
[2] http://people.freebsd.org/~zont/racct.patch

--=20
Andrey Zonov


--------------enig6E4239DCB20C1E641CC3E0B6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJQP0dxAAoJEBWLemxX/CvTO9gH/RsdGYsLBOepleQSctFdabGr
35gtiy+olhOaUOienpUgRPJGKYh2P3urj4w1vYKMyd3OGstCDiUHtO8T8ZwQO3an
AM5eLOzDuegnSZjXf5hxryX8qdY05WOrLN7/5Cedxr/3OHR3AIb8Zrbk+aBZ7kf+
9Cl2a1DkMJzJ79Ipw/U3frN7mZlKhVM2U1sazNT+SImf6SJ3tJfTWuIm0OO8iEq7
w69YjyM1kAmjfwWwnAjV0Z0VO70vmhaRf27Nsww61GzrGRa/GGRQcfz/Lb/QIS5f
0+XHm46pKqbEpkeMJNOZvh2HLpqD2Oh3claWTvGDgmbziSMshdw+Gq18IjXLxMM=
=8tIU
-----END PGP SIGNATURE-----

--------------enig6E4239DCB20C1E641CC3E0B6--



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