Re: [PATCH] staging/lustre: Always try kmalloc first for OBD_ALLOC_LARGE

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

 



On Sun, May 03, 2015 at 03:14:58PM -0400, Oleg Drokin wrote:
> Hello!
> 
> On May 3, 2015, at 2:31 PM, Greg KH wrote:
> 
> >> -/* Allocations above this size are considered too big and could not be done
> >> - * atomically.
> >> - *
> >> - * Be very careful when changing this value, especially when decreasing it,
> >> - * since vmalloc in Linux doesn't perform well on multi-cores system, calling
> >> - * vmalloc in critical path would hurt performance badly. See LU-66.
> >> - */
> >> -#define OBD_ALLOC_BIG (4 * PAGE_CACHE_SIZE)
> >> -
> >> #define OBD_ALLOC_LARGE(ptr, size)					    \
> >> do {									  \
> >> -	if (size > OBD_ALLOC_BIG)					     \
> >> -		OBD_VMALLOC(ptr, size);				       \
> >> -	else								  \
> >> -		OBD_ALLOC(ptr, size);					 \
> >> +	ptr = libcfs_kvzalloc(size, GFP_NOFS);				  \
> >> } while (0)
> > 
> > Just fix up all callers of these functions, if there are any anymore.
> 
> This is what Julia is doing. I am providing the stub for her wonderful scripts to unwrap per her request.
> 
> >> + */
> >> +/*
> >> + * Copyright (c) 2015, Oleg Drokin <green@xxxxxxxxxxxxxx>
> > 
> > I think your employer would like a different line here...
> 
> Only on stuff that I do at work when I am getting paid.
> 
> Stuff that I do on my own uncompensated, I own all the rights to, I hope.

I wouldn't be so sure about this, please read your employment contract,
almost no companies allow this, it is very rare.

thanks,

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux