From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Ichilevici de Oliveira Subject: Interleaved allocation Date: Mon, 8 Dec 2014 17:14:28 -0200 Message-ID: <20141208191428.GD7371@gamayun> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a2FkP9tdjPU2nyhF" Return-path: Content-Disposition: inline Sender: linux-numa-owner@vger.kernel.org List-ID: To: linux-numa@vger.kernel.org --a2FkP9tdjPU2nyhF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I'm trying to understand what's the exact behavior of the interleaved allocation in libnuma. I have two questions, the first regarding numa_alloc_interleaved() and the second regarding numactl. Suppose I'm running in a 4-node machine. 1. What happens when I try to allocate 100 pages with a call like this: numa_alloc_interleaved(100 * numa_pagesize()) I can think of two possible allocation schemes: a. Pages 0-24 are allocated to node 0, pages 25-49 are allocated to node 1, pages 50-74 are allocated on node 2 and pages 75-99 are allocated on node 3. b. Pages 0,4,8... are allocated on node 0, pages 1,5,9... are allocated on node 1 and so on 2. What's the effect of using numactl --interleaved=0,1,2,3 -- ./myprog? I would assume it "substitutes" any malloc's to numa_alloc_interleaved(), but I'm not sure if it's just that. Thank you, Martin --a2FkP9tdjPU2nyhF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJUhfiUAAoJEKAgcdgOx8KDqjoP/1EJwdpUcxx2wdl3Aqgue5eS z8ORHMNiHSDx5La/fTkMcl+X/4hCack+inliA+uo5pv9lScCb203dcgCi31geAaq DGYTCSBOBrPVZx3PZ/50gaJ5R63axMuMpGv3Y93G9usE05i251VdJsehRDbEcQLd 3iWDUtLgcSpUgVHOhAojhYdjg+2Ja4ZKPgbXONcYS5Turv/xF0tqxVcOV/vp/1S4 JlhI45FvV0G332IE/u5KLfXZHF2ovCdKOA7NmmLzw+r7JcnV3NttA2FrZFIKmpTR enx93XsN3i6l1Nx3Pr+AOkbVZCzTK3ihjM/FPTNYQH2ywdRtTprRJpjokIjs0xPW /A3nsbKGc0uWyi5a/RRr+Pfz8C6mU8VVrVgQcuMOcTKuBM70hjs2kV/4KwcKzeAq D/xD9ROR5YgJGAdCz8PbnNAFWtvkQRyEW5EIPBNzrqCGWFyI78pXmylKjVFD/2Qq k9seYyxDaih5isq+FWry4FqL/QvyGNy0+/UxVhjTBKcRKAfvdFcGz4iwNuzOsyYo BHuSyaFwjiq9bC+/316RJ9VmEkxqpj+egX+iNzxm41ifi2C8YK4apFKklgX9hcyk 5dxiEFcE9q1yPc5Cp3ftAEsRZpmqpoNWHLnwiDZTaJyWrEjvGZy+cNZGO3lVX5wn sjNr6VhjZmSRA9q1w/Qj =yHIJ -----END PGP SIGNATURE----- --a2FkP9tdjPU2nyhF--