netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	David Rientjes <rientjes@google.com>,
	Mel Gorman <mgorman@suse.de>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ben Skeggs <bskeggs@redhat.com>,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Santosh Raspatur <santosh@chelsio.com>,
	Hariprasad S <hariprasad@chelsio.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Yishai
Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants
Date: Thu, 12 Jan 2017 15:14:54 -0500	[thread overview]
Message-ID: <09bbc480-1490-da27-732c-046e0ebfa89f@oracle.com> (raw)
In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org>


> diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
> index 6890897a6f30..10f1ef582659 100644
> --- a/drivers/xen/evtchn.c
> +++ b/drivers/xen/evtchn.c
> @@ -87,18 +87,6 @@ struct user_evtchn {
>  	bool enabled;
>  };
>  
> -static evtchn_port_t *evtchn_alloc_ring(unsigned int size)
> -{
> -	evtchn_port_t *ring;
> -	size_t s = size * sizeof(*ring);
> -
> -	ring = kmalloc(s, GFP_KERNEL);
> -	if (!ring)
> -		ring = vmalloc(s);
> -
> -	return ring;
> -}
> -
>  static void evtchn_free_ring(evtchn_port_t *ring)
>  {
>  	kvfree(ring);
> @@ -334,7 +322,7 @@ static int evtchn_resize_ring(struct per_user_data *u)
>  	else
>  		new_size = 2 * u->ring_size;
>  
> -	new_ring = evtchn_alloc_ring(new_size);
> +	new_ring = kvmalloc(new_size * sizeof(*new_ring), GFP_KERNEL);
>  	if (!new_ring)
>  		return -ENOMEM;
>  

Xen bits:

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2017-01-12 20:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170112153717.28943-1-mhocko@kernel.org>
2017-01-12 15:37 ` [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants Michal Hocko
2017-01-12 15:57   ` David Sterba
2017-01-12 16:05   ` Christian Borntraeger
2017-01-12 16:54   ` Ilya Dryomov
2017-01-12 17:18     ` Michal Hocko
2017-01-12 17:00   ` Dan Williams
2017-01-12 17:26   ` Kees Cook
2017-01-12 17:37     ` Michal Hocko
2017-01-20 13:41       ` Vlastimil Babka
2017-01-24 15:00         ` Michal Hocko
2017-01-25 11:15           ` Vlastimil Babka
2017-01-25 13:09             ` Michal Hocko
2017-01-25 13:40               ` Ilya Dryomov
2017-01-12 17:29   ` Michal Hocko
2017-01-12 20:14   ` Boris Ostrovsky [this message]
2017-01-13  1:11   ` Dilger, Andreas
2017-01-14 10:56   ` Leon Romanovsky
2017-01-16  7:33     ` Michal Hocko
2017-01-16  8:28       ` Leon Romanovsky
2017-01-16  8:18   ` Tariq Toukan
2017-01-12 15:37 ` [RFC PATCH 6/6] net: use kvmalloc with __GFP_REPEAT rather than open coded variant Michal Hocko

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=09bbc480-1490-da27-732c-046e0ebfa89f@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@enomsg.org \
    --cc=bskeggs@redhat.com \
    --cc=ccross@android.com \
    --cc=hannes@cmpxchg.org \
    --cc=hariprasad@chelsio.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=keescook@chromium.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=rjw@rjwysocki.net \
    --cc=santosh@chelsio.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tariqt@mellanox.com \
    --cc=tony.luck@intel.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).