From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 17 09:50:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E02E916A41F for ; Tue, 17 Jan 2006 09:50:33 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A24343D48 for ; Tue, 17 Jan 2006 09:50:33 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by wproxy.gmail.com with SMTP id i31so1302779wra for ; Tue, 17 Jan 2006 01:50:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Z6qo5GbbUUvsc+0Cfrb3UDLt6fxGJglGXX5b4XLeBjA8ae4CUmaTXA+9zrgU3oiCrmLpAsUR6PRAl+bH04Yx0Kii6AoVkYMzXVstp6qWfLqkWTcrsI4jhc7nfO73BNlKLgZjIZ2U38+tREbQAcf/POVe+XKH0nZtGeP5ClIXuQk= Received: by 10.64.204.1 with SMTP id b1mr3660304qbg; Tue, 17 Jan 2006 01:50:32 -0800 (PST) Received: by 10.65.43.10 with HTTP; Tue, 17 Jan 2006 01:50:32 -0800 (PST) Message-ID: Date: Tue, 17 Jan 2006 15:20:32 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: Pranav Sawargaonkar In-Reply-To: <5007e1a40601170109x6f8c7b03kb44f5f5a43ebe3be@mail.gmail.com> MIME-Version: 1.0 References: <5007e1a40601161013q5692f79dge001ceac5de991df@mail.gmail.com> <5007e1a40601170109x6f8c7b03kb44f5f5a43ebe3be@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Accessing Pagetable of a process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 09:50:34 -0000 there is some code in dragonflybsd to checkpoint a process. It will write the pagetable to disk. Since the internal data structures aren't much different -you should be able to copy over that code to freebsd. But you will run into problems with file descriptors that are not of type vnode (eg fifo/sockets/pipes etc..). regards -kamal On 1/17/06, Pranav Sawargaonkar wrote: > > Hello, > I wanted to save the whole context of the process, thats why I wan= t > the access to each page allocated to the process of our interest. And > further I want to write all these pages on to swap. > The final objective is to save the context of a stopped process on > the swap and restore the context afterwards and resume the process.Whatfu= nctions can be used to read/write to swap ? I have succeeded > in accessing the vmspace through the 'struct proc' type pointer. > > TIA. > > Best regards, > Pranav > > On 1/17/06, Kamal R. Prasad wrote: > > > > > > > > On 1/16/06, Pranav Sawargaonkar < pranav.sawargaonkar@gmail.com> wrote: > > > > > > Hi > > > I want to access pagetable of a perticular process. > > > How i should get it?Is it possible to access by using pointer of type > > > 'struct proc'? > > > > > > by accessimg the vmspace for the process. > > > > Also i want to access each page referenced in > > > pagetable of that process by writing my module how i can achieve > > > this? > > > Thanks in advance. > > > > > > the pagetable is for translating virtual to physical addresses If you > > want the contents of the page -you don't need to worry about the transl= ation > > scheme. Im not sure I understand what you are looking for?? > > > > regards > > -kamal > > > > > > -Pranav > > > _______________________________________________ > > > freebsd-hackers@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd= .org > > > " > > > > > > > >