All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kyle Fortin <kyle.fortin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Chet L <chetanloke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	lduncan-IBi9RG/b67k@public.gmane.org,
	cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
	martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] libiscsi: use vzalloc for large allocations in iscsi_pool_init
Date: Wed, 5 Apr 2017 09:50:10 -0400	[thread overview]
Message-ID: <63C25EDB-036E-40D9-8A9D-42984E7EDB8E@oracle.com> (raw)
In-Reply-To: <CAHnHxtyP=OGgCePeb9bde1GR_-nk1QdG7Ou9ndMSpatxH=oomQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Apr 3, 2017, at 3:46 PM, Chet L <chetanloke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> On Mon, Apr 3, 2017 at 6:30 AM, Kyle Fortin <kyle.fortin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 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




-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

      parent reply	other threads:[~2017-04-05 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 13:30 [PATCH] libiscsi: use vzalloc for large allocations in iscsi_pool_init Kyle Fortin
     [not found] ` <1491226221-24621-1-git-send-email-kyle.fortin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-03 13:41   ` Johannes Thumshirn
2017-04-03 14:02     ` Kyle Fortin
2017-04-03 19:46 ` Chet L
     [not found]   ` <CAHnHxtyP=OGgCePeb9bde1GR_-nk1QdG7Ou9ndMSpatxH=oomQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-05 13:50     ` Kyle Fortin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63C25EDB-036E-40D9-8A9D-42984E7EDB8E@oracle.com \
    --to=kyle.fortin-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=chetanloke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=lduncan-IBi9RG/b67k@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.