Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4142964ybl; Tue, 21 Jan 2020 13:46:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwbR/kKmBd1Rjp7S/luiZZBqOAl4i5hORucovGP/a5P+xTX0za7mWAAizCg9RxhtXT/puki X-Received: by 2002:a05:6830:4b9:: with SMTP id l25mr5207222otd.266.1579643188029; Tue, 21 Jan 2020 13:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579643188; cv=none; d=google.com; s=arc-20160816; b=F+sO25nEh8GfKKl1RvJHkynXhhiXfT9v45qUYecDjg5XSY/nw1lXE97bxw2eKw8ZDk yAFVyXcZfLXTYdZ0UR6IbA65UE64EsycdzpyDdRq74ktBpmiQ7bxw/eQethI3UEE9Czr 2y2CxsVsGU9VJF4kmiuARrpUUeRjAk6TCEUVfsO1LbTxM96quaCBT/BtDPsEedAT95v5 VDiuLy53Hg7kaP8ZAdplL1tYHcwXOxUxZ8IqUtt9uBJNLJjGGk5QCXcIcGxpSrrWHn9c 35lZLcvBtXfH4DYTsUp+9LwzLLUg8CG4XxItjDjz8mVra5tZ1W5YyMtIAuQvzppMR9QY giHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=qhB3UuBUtt5HawhIaAOn2mhzpgAiU2Yn8SusIv8TNBE=; b=PQ7N9/Xme8NANiXdEvJnROCL3jih7UR2TTXI0hU3DLmmJVLTFVjU+9L+jy85E+693F gRSYrLcPgo3xtWRymNZCnY5zp5J7eI2Cps5XNjAuYwWMeDX31t6zGCvURfYQTbM7IsYA pjzzG+W3cFmOERx47uIdNzaASSAjdlP80vRRSZqIcv80a7csikCAMkHS3WE0eeevg/3K jyNc80xbukcGChbIP204VJ8cuOH4BKKuNZD1BTz+1Wk1wnmZkJQVwaWuU7Jni00tbbiu FQ5U2e7jt50npC197n8hflWQaW+YbRJ/32Bodk2mcQ4Hc/wAYnrAuIOnuYP91USGoYnr DV1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o206si20274760oih.143.2020.01.21.13.46.12; Tue, 21 Jan 2020 13:46:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729049AbgAUVoa (ORCPT + 99 others); Tue, 21 Jan 2020 16:44:30 -0500 Received: from gentwo.org ([3.19.106.255]:55880 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728799AbgAUVo3 (ORCPT ); Tue, 21 Jan 2020 16:44:29 -0500 Received: by gentwo.org (Postfix, from userid 1002) id C4A623F247; Tue, 21 Jan 2020 21:44:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id C22693EC49; Tue, 21 Jan 2020 21:44:28 +0000 (UTC) Date: Tue, 21 Jan 2020 21:44:28 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Mathieu Desnoyers cc: Jann Horn , Peter Zijlstra , Thomas Gleixner , linux-kernel , Joel Fernandes , Ingo Molnar , Catalin Marinas , Dave Watson , Will Deacon , shuah , Andi Kleen , linux-kselftest , "H. Peter Anvin" , Russell King , Michael Kerrisk , Paul , Paul Turner , Boqun Feng , Josh Triplett , rostedt , Ben Maurer , linux-api , Andy Lutomirski Subject: Re: [RFC PATCH v1] pin_on_cpu: Introduce thread CPU pinning system call In-Reply-To: <2049164886.596497.1579641536619.JavaMail.zimbra@efficios.com> Message-ID: References: <20200121160312.26545-1-mathieu.desnoyers@efficios.com> <430172781.596271.1579636021412.JavaMail.zimbra@efficios.com> <2049164886.596497.1579641536619.JavaMail.zimbra@efficios.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These scenarios are all pretty complex and will be difficult to understand for the user of these APIs. I think the easiest solution (and most comprehensible) is for the user space process that does per cpu operations to get some sort of signal. If its not able to handle that then terminate it. The code makes a basic assumption after all that the process is running on a specific cpu. If this is no longer the case then its better to abort if the process cannot handle moving to a different processor.