Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 22 Nov 2001 18:47:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 22 Nov 2001 18:47:31 -0500 Received: from ns01.netrox.net ([64.118.231.130]:7860 "EHLO smtp01.netrox.net") by vger.kernel.org with ESMTP id ; Thu, 22 Nov 2001 18:47:14 -0500 Subject: Re: [patch] sched_[set|get]_affinity() syscall, 2.4.15-pre9 From: Robert Love To: mingo@elte.hu Cc: linux-kernel@vger.kernel.org, linux-smp@vger.kernel.org In-Reply-To: In-Reply-To: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.1+cvs.2001.11.14.08.58 (Preview Release) Date: 22 Nov 2001 18:45:51 -0500 Message-Id: <1006472754.1336.0.camel@icbm> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2001-11-22 at 03:59, Ingo Molnar wrote: > the attached set-affinity-A1 patch is relative to the scheduler > fixes/cleanups in 2.4.15-pre9. It implements the following two > new system calls: [...] Ingo, I like your implementation, particularly the use of the cpu_online_map, although I am not sure all arch's implement it yet. I am curious, however, what you would think of using a /proc interface instead of a set of syscalls ? Ie, we would have a /proc//cpu_affinity which is the same as your `unsigned long * user_mask_ptr'. Reading and writing of the proc interface would correspond to your get and set syscalls. Besides the sort of relevancy and useful abstraction of putting the affinity in the procfs, it eliminates any sizeof(cpus_allowed) problem since the read string is the size in characters of cpus_allowed. I would use your syscall code, though -- just reimplement it as a procfs file. This would mean adding a proc_write function, since the _actual_ procfs (the proc part) only has a read method, but that is simple. Thoughts? Robert Love - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/