Re: [PATCH] libiscsi: use vzalloc for large allocations in iscsi_pool_init

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

 



On Apr 3, 2017, at 3:46 PM, Chet L <chetanloke@xxxxxxxxx> wrote:
> 
> On Mon, Apr 3, 2017 at 6:30 AM, Kyle Fortin <kyle.fortin@xxxxxxxxxx> wrote:
> 
>> 
>>        for (i = 0; i < q->max; i++)
>>                kfree(q->pool[i]);
>> -       kfree(q->pool);
>> +       if (q->is_pool_vmalloc)
> 
> you could do something like:
> 
> if (is_vmalloc_addr(q->pool))
>    vfree(...);
> else
>    kfree(..);
> 
> And then remove the bool.
> 
> Chetan

Using linux-mmots.git which includes the new kvmalloc api, this patch is greatly simplified to a 2 character change (‘v’ x 2) of using kvmalloc / kvfree for the iscsi_pool allocation.  When kvmalloc is accepted into mainline and makes it into scsi.git, then I’ll post the v2 patch using that.

--
Kyle Fortin - Oracle Linux Engineering







[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