Re: [PATCH 2/7] aacraid: aacraid: AIF preallocation

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

 



On Tue, 2005-09-20 at 12:56 -0700, Mark Haverkamp wrote:
> +                                && ((hw_fib_pool = kmalloc(sizeof
> (struct hw_fib *) * num, GFP_ATOMIC|GFP_KERNEL)))
> +                                && ((fib_pool = kmalloc(sizeof(struct
> fib *) * num, GFP_ATOMIC|GFP_KERNEL)))) {
> +                                       hw_fib_p = hw_fib_pool;
> +                                       fib_p = fib_pool;
> +                                       while (hw_fib_p < &hw_fib_pool
> [num]) {
> +                                               if (!(*(hw_fib_p++) =
> kmalloc(sizeof(struct hw_fib), GFP_ATOMIC|GFP_KERNEL))) {
> +                                                       --hw_fib_p;
> +                                                       break;
> +                                               }
> +                                               if (!(*(fib_p++) =
> kmalloc(sizeof(struct fib), GFP_ATOMIC|GFP_KERNEL))) {

all of these allocations should be either GFP_ATOMIC or GFP_KERNEL, but
not both (it looks like they should be GFP_KERNEL).  What GFP_KERNEL|
GFP_ATOMIC actually gives you is a potentially sleeping allocation that
will exhaust the emergency pools, which sounds really undesirable.

James


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux