kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Given a page, How to get the NUMA node id of this page
@ 2013-08-29 18:43 ajay saini
  2013-08-29 20:08 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 3+ messages in thread
From: ajay saini @ 2013-08-29 18:43 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I am working on a checkpoint/Restart Linux kernel module.?
Wherein, a process sends a request to this module to checkpoint itself.?In this process information about the process is stored in a file, which is used later on to restart the process.

Now when this module is storing the information related to pages (of the process) in a file, we also want to know on which NUMA node this page was assigned
Can you suggest what will be the best way to get this data (page to NUMA node mapping)


I tried using?page_to_nid(page), but I am not really sure it gives me correct value.
(Like, I am working on linux 2.6.32, 64 bit machine with 16 cores and there are 4 NUMA nodes (4 cores on each) on it, but this function returns 32 when called)

Thanks,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130830/08bf077a/attachment.html 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Given a page, How to get the NUMA node id of this page
  2013-08-29 18:43 Given a page, How to get the NUMA node id of this page ajay saini
@ 2013-08-29 20:08 ` Valdis.Kletnieks at vt.edu
       [not found]   ` <1377808754.59794.YahooMailNeo@web193406.mail.sg3.yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-08-29 20:08 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 30 Aug 2013 02:43:00 +0800, ajay saini said:
> I am working on a checkpoint/Restart Linux kernel module.

Have you looked at the already existing checkpoint/restart support?

(and C/R is a lot harder to get right than you think - turns out you
need all sorts of infrastructure.  The various namespaces support, for
instance, are to a large degree to allow C/R to work right.  For example,
you need PID namespaces so you can properly do C/R of a process that has
done a getpid() call - because you need to restart it with the same PID
that it had at checkpoint time.

in init/Kconfig:

config CHECKPOINT_RESTORE
        bool "Checkpoint/restore support" if EXPERT
        default n
        help
          Enables additional kernel features in a sake of checkpoint/restore.
          In particular it adds auxiliary prctl codes to setup process text,
          data and heap segment sizes, and a few additional /proc filesystem
          entries.

          If unsure, say N here.

Enjoy, and don't re-invent the wheel.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130829/1ccbd13e/attachment.bin 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Given a page, How to get the NUMA node id of this page
       [not found]   ` <1377808754.59794.YahooMailNeo@web193406.mail.sg3.yahoo.com>
@ 2013-08-29 20:46     ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 3+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-08-29 20:46 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 30 Aug 2013 04:39:14 +0800, ajay saini said:
> I am working on BLCR (a?checkpoint/Restart Linux kernel module), currently it
> does not have this information.

Yes, but why are you re-inventing the wheel?  Is there a reason the existing
in-kernel support for C/R isn't usable for your situation?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130829/801ed5fd/attachment.bin 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-29 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 18:43 Given a page, How to get the NUMA node id of this page ajay saini
2013-08-29 20:08 ` Valdis.Kletnieks at vt.edu
     [not found]   ` <1377808754.59794.YahooMailNeo@web193406.mail.sg3.yahoo.com>
2013-08-29 20:46     ` Valdis.Kletnieks at vt.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).