From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 6 May 2001 11:45:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 6 May 2001 11:45:37 -0400 Received: from t2.redhat.com ([199.183.24.243]:48111 "EHLO passion.cambridge.redhat.com") by vger.kernel.org with ESMTP id ; Sun, 6 May 2001 11:45:24 -0400 X-Mailer: exmh version 2.3 01/15/2001 with nmh-1.0.4 From: David Woodhouse X-Accept-Language: en_GB In-Reply-To: <20010506142548.D31269@metastasis.f00f.org> In-Reply-To: <20010506142548.D31269@metastasis.f00f.org> <20010506033746.A30690@metastasis.f00f.org> To: Chris Wedgwood Cc: Rik van Riel , Peter Rival , Anton Blanchard , linux-kernel@vger.kernel.org Subject: Re: [PATCH] CPU hot swap for 2.4.3 + s390 support Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 06 May 2001 16:38:18 +0100 Message-ID: <12862.989163498@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org cw@f00f.org said: > How do you relocate > -- pages which are mlocked without violating RT contraints? > -- pages which contain kernel pointers and might be accessed from > interrupt context? Those two are the same problem, essentially. You have to copy the page, then map it into the same virtual address (be that userspace or kernelspace) as the old one. Mark the page readonly when you start to copy it, and have a fault handler which immediately marks it writable and returns. If the source is writable by the time you've finished the copy, repeat. If you have to repeat yourself more than $n times, you're probably experiencing livelock. At that point, do what Rik said - to hell with the RT constraints, disable interrupts and do the copy. At least your cache is warm :) -- dwmw2