Re: memory leaks in numa_run_on_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andi,

On Thu, Jun 27, 2013 at 02:31:41AM +0200, Andi Kleen wrote:
> libnuma caches the node masks of CPUs. This is a global cache that
> is bounded by the number of CPUs. It's not a leak that will grow
> over time.
> 
> So it's a false positive.

Thanks for the quick response, and sorry for the false bug report.

What's the proper forum for asking questions about how to use the API?
The documentation is rather slender. :-)

In particular, I'd like to know if this is valid code for binding the
memory to node 0, regardless of the number of nodes on the system:

   {
      unsigned long mask = 1;
      struct bitmask nodemask;

      nodemask.size = 1;
      nodemask.maskp = &mask;
      numa_set_membind(&nodemask);
   }

I tried calling set_mempolicy directly for this trivial case, but I get
EINVAL when I try:

   {
      unsigned long mask = 1;
      set_mempolicy(MPOL_BIND, &mask, 1);
   }

Increasing the 3rd arg from 1 to 2 seems to solve the problem, but I cannot
understand why from "man 2 set_mempolicy".

Any guidance on these issues or pointers to where to find help would
be appreciated.

Thanks,
Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux