> -----Original Message----- > From: Greg KH [mailto:gregkh@xxxxxxxxxxxxxxxxxxx] > Sent: Saturday, May 30, 2015 11:41 PM > To: KY Srinivasan > Cc: linux-kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx; > olaf@xxxxxxxxx; apw@xxxxxxxxxxxxx; vkuznets@xxxxxxxxxx; > jasowang@xxxxxxxxxx > Subject: Re: [PATCH V2 3/3] Drivers: hv: vmbus: Allocate ring buffer memory > in NUMA aware fashion > > On Sat, May 30, 2015 at 11:37:49PM -0700, K. Y. Srinivasan wrote: > > Allocate ring buffer memory from the NUMA node assigned to the > channel. > > But you do more than just that. If there's a failure, you fall-back to > the old allocation method. Why not mention that as well? I will mention this in the change log. > > And is that what you really want? Do we ever fail allocation for a node > but still have memory from another one? Shouldn't the logic be in the > allocator and not be forced to be in every caller? I do want this behavior. The allocation from a specific node is just to maintain NUMA locality and there is no correctness issue even if the allocation came from a non-preferred node. So, I don't want to fail the load of the driver just because I could not allocate from the preferred node. To answer your second question, I think the allocation can fail when we specify a specific node, when there may be memory available on other zones and the specified node has no free memory. I think it is good to have the caller deal with this case since in some cases we would rather fail if we cannot allocate memory from the specified node. Regards, K. Y > > thanks, > > greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel