Re: [PATCH] hiddev: Use vzalloc to allocate hiddev_list

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

 



On Thu, Apr 26, 2012 at 11:16:00AM -0700, Havard Skinnemoen wrote:
> Everytime a HID device is opened, a new hiddev_list is allocated with
> kzalloc. This requires 64KB of physically contiguous memory, which could
> easily push a heavily loaded system over the edge.

Really?  64Kb is a "trigger"?  What type of systems are we talking about
here that this happens on?

And who is opening lots of HID devices?  This should only happen once at
startup, and usually not again, unless a new device is added to the
system, right?

> Allocating the same amount of memory with vmalloc shouldn't be nearly as
> demanding, so let's do that instead. The memory isn't used for DMA and
> doesn't look particularly performance sensitive, so this should be safe.

Have you found that this patch solves the issue you are having?  I'm
sure that some other 64Kb allocation will then cause a problem, right?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux