From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Jackson Date: Tue, 29 Jun 2004 00:38:08 +0000 Subject: How to notify app of changed cpu/mem/io node configuration? Message-Id: <20040628173808.04718b83.pj@sgi.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org How is it that applications will be notified of changes in a systems configuration, such as cpu, memory or i/o nodes coming online and going offline? I have not followed the hotplug email lists (neither this one, nor the memory or cpu or node hotplug lists) closely enough to know if this is well understood, or not. My apologies if I am covering old ground. The cpuset work that Simon Derr (Bull) and I are doing, to support constrained placement of sets of tasks on possibly exclusive sets of CPUs and Memory Nodes, will eventually require some means to notify tasks if the CPU/Memory nodes allowed to them by their cpuset have changed, so that they can rebind to the appropriate new CPU or Memory nodes. I intend to post a patch of this cpuset work to lkml, within the next day, for review and feedback. For now, no migration is supported, and notification of CPU or Memory placement changes not useful. But, later on, I believe it will need to be added. In other words, if there was an agreed mechanism for notifying tasks of nodes going on and off line, I would hope to use the same mechanism for notifying them that the nodes _allowed_ to them in their current cpuset had changed. In either case, the task had best move. I can imagine using for notification a new signal, that could be sent by an administrator or system service (batch manager, perhaps) to tasks if their allowed CPUs or Memory Nodes or other such had changed. Then, for example, shared library code could catch the signal, and optionally reissue sched_setaffinity(), mbind() or set_mempolicy() calls with changed values, reflecting the new resources available to that task. If a task refused to take the hint and move, it could be administratively shot. However this is just my brainstorming, and may well not be a good way to handle this. By the way - on which of the Hotplug, Hotplug Memory, Hotplug CPU and/or Hotplug Node email lists on SourceForge is it appropriate to ask this questions? I'm guessing the plain Hotplug list, figuring it covers overall issues not specific to CPU, Memory or Nodes. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel