Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp695259pxb; Fri, 21 Jan 2022 00:45:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDtAyk4+Gor5OAn3eoGQtFnNpiLCIvf2dgxFAcMzsagx4uVqIiV7L4+f//MMjv1uO/2Qnj X-Received: by 2002:a17:902:8605:b0:149:9a25:103c with SMTP id f5-20020a170902860500b001499a25103cmr2804109plo.155.1642754717521; Fri, 21 Jan 2022 00:45:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642754717; cv=none; d=google.com; s=arc-20160816; b=u/Bm6748vVmpLsP4hjr6bTpBDKuHdyRw/+64KbAoed8EfT9BH/szlqbgUA/8zgVQQd xVueUQ5SMnR8WVv/efFuekmnH3xKzYSgufZ57EdJc7zYC0g3xN/1rqS4747WBHg2zrVr U81ljNXExsqgmlJAmzeCjo+Rexw65MKjQ4Bi3TwHF1P9zH7gy5YYtefQQn7TZuxueyMz vbBsdVgQ8j0MGXyYTe0rV8zf7kFWuErSHUy2ULwPq56PcJM8DCIOrkscgbOyxH9p0lov iFBOJ5slnbU6Nr1Nkjg/hmUddFmg2VG/PtToA6RstNK1mlcJPfztZ3kkzCw69OUKmfYw gqPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KphibsF8zsYC34Ld7DK4pyvyw/yHoylCwP8s5VLpXW4=; b=moZR70HgPm/oFUSHcqH4A6bryy3USNftiw7IDPD80WHAIoPSbnLdzXRZH21LWvxvkx mnlEMyqdGlgwNxevaYlpGxqlVtGgxUs72USNTUDMTU+/5BjbuMEKfMojaH489jloeYwE vy7jtYevvwj3SymRKdFRFtaGJ66XZov7BxsdGu8mqhmFzQwMTGRvTc3e/CuLIUgMeYXh tAFG628ND4QniTWWpW6ItF5DbX5Jxy2Mt6AZg4wpR2uVvWvOsQQRIzNp50nB1oQvyb6z ELIJZRNuyrBfRZT9gU1Ee2UNomULAyY/WKYfIRjJeOwKYJDT6mmD38u0+JgXlwe+QB1T JhYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=S0r5oXN+; spf=pass (google.com: domain of linux-numa-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-numa-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si4968688plo.45.2022.01.21.00.45.00; Fri, 21 Jan 2022 00:45:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-numa-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=S0r5oXN+; spf=pass (google.com: domain of linux-numa-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-numa-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240304AbiARVXT (ORCPT + 57 others); Tue, 18 Jan 2022 16:23:19 -0500 Received: from one.firstfloor.org ([193.170.194.197]:57450 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234934AbiARVXT (ORCPT ); Tue, 18 Jan 2022 16:23:19 -0500 Received: by one.firstfloor.org (Postfix, from userid 503) id 1983B87A17; Tue, 18 Jan 2022 22:23:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1642540997; bh=ZkpJxTRBy4ySitzKVH3ljK5G8HiTrvpP68riGizxyHk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S0r5oXN+K0/OcCr4fAkIjxnJJS8mnLroMUNnYk6FiMuDE59qvI+cHEf7CDzVuYa56 AqYBPw5yzuIj+r9Of9Q6FKPoIRmqMqOijp+GfotQegQCryic5E1UiIfmSn2eC5Wf05 W8ACFZ8JzR3KhZ0PZagAPmnyO4z/RReMJcwdJxDA= Date: Tue, 18 Jan 2022 13:23:16 -0800 From: Andi Kleen To: Andreas Grapentin Cc: linux-numa@vger.kernel.org, Andi Kleen Subject: Re: utility for numa placement of POSIX shared memory segments Message-ID: <20220118212315.g6tksukstq7wqhxm@two.firstfloor.org> References: <20220115100542.qanbvb6dhz27sdyj@parabolabook-BM15.localdomain> <20220115160946.uwur26u3zyzcwvzo@two.firstfloor.org> <20220117080436.ay2ep2hqxe5fe2yf@parabolabook-BM15.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220117080436.ay2ep2hqxe5fe2yf@parabolabook-BM15.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Precedence: bulk List-ID: X-Mailing-List: linux-numa@vger.kernel.org Sorry for the late answer On Mon, Jan 17, 2022 at 09:04:36AM +0100, Andreas Grapentin wrote: > It seems to me that until now, the main numactl binary is limited to > functionality to query and control the policies that determine the > placement of future pages. Physically moving already placed pages from a > process' resident set had been implemented in the separate binary > migratepages, which seemed like a good separation of concerns to me. > That's why I initially suggested having a separate binary for the moving > of shared memory pages. migratepages is separate because it deals with the private address space of a process, not because it moves pages. > > That being said, it is definitely possible to integrate that > functionality into the numactl binary, if this is the preferred > approach. What do you suggest would be a good integration into the > command line parameter setup? I would add a --move-pages > > Secondly, lookig at the command line parameters of numactl, it seems to > only be compatible with SysV shared memory segments (ftok, shmget), not > posix shared memory segments (shm_open) is this correct? shm_open is just a wrapper around mmap on a file. You can specify the underlying file of shm_open with --file -Andi