search for: __gfp_high

Displaying 20 results from an estimated 41 matches for "__gfp_high".

2015 Dec 01
2
[PATCH] virtio: Do not drop __GFP_HIGH in alloc_indirect
From: Michal Hocko <mhocko at suse.com> b92b1b89a33c ("virtio: force vring descriptors to be allocated from lowmem") tried to exclude highmem pages for descriptors so it cleared __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH which doesn't make much sense for this fix because __GFP_HIGH only controls access to memory reserves and it doesn't have any influence on the zone selection. Some of the call paths use GFP_ATOMIC and dropping __GFP_HIGH will reduc...
2015 Dec 01
2
[PATCH] virtio: Do not drop __GFP_HIGH in alloc_indirect
From: Michal Hocko <mhocko at suse.com> b92b1b89a33c ("virtio: force vring descriptors to be allocated from lowmem") tried to exclude highmem pages for descriptors so it cleared __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH which doesn't make much sense for this fix because __GFP_HIGH only controls access to memory reserves and it doesn't have any influence on the zone selection. Some of the call paths use GFP_ATOMIC and dropping __GFP_HIGH will reduc...
2015 Dec 01
0
[PATCH] virtio: Do not drop __GFP_HIGH in alloc_indirect
On Tue, Dec 01, 2015 at 03:32:49PM +0100, Michal Hocko wrote: > From: Michal Hocko <mhocko at suse.com> > > b92b1b89a33c ("virtio: force vring descriptors to be allocated from > lowmem") tried to exclude highmem pages for descriptors so it cleared > __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH > which doesn't make much sense for this fix because __GFP_HIGH only > controls access to memory reserves and it doesn't have any influence > on the zone selection. Some of the call paths use GFP_ATOMIC and > dropping _...
2008 Mar 15
1
extent_io.c: bio_add_page() error check for bio ptr
...sector + (bio->bi_size >> 9) != sector || bio_add_page(bio, page, size, offset) < size) { ret = submit_one_bio(rw, bio); @@ -1741,6 +1742,7 @@ static int submit_extent_page(int rw, st bio = extent_bio_alloc(bdev, sector, nr, GFP_NOFS | __GFP_HIGH); if (!bio) { printk("failed to allocate bio nr %d\n", nr); + BUG_ON(!bio); } -- Regards, Peter Teoh
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
...lock/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct blkfront_info *info) int j; /* Stage 1: Make a safe copy of the shadow state. */ - copy = kmalloc(sizeof(info->shadow), + copy = kmemdup(info->shadow, sizeof(info->shadow), GFP_NOIO | __GFP_REPEAT | __GFP_HIGH); if (!copy) return -ENOMEM; - memcpy(copy, info->shadow, sizeof(info->shadow)); /* Stage 2: Set up free list. */ memset(&info->shadow, 0, sizeof(info->shadow)); -- 1.7.10.4
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
...lock/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct blkfront_info *info) int j; /* Stage 1: Make a safe copy of the shadow state. */ - copy = kmalloc(sizeof(info->shadow), + copy = kmemdup(info->shadow, sizeof(info->shadow), GFP_NOIO | __GFP_REPEAT | __GFP_HIGH); if (!copy) return -ENOMEM; - memcpy(copy, info->shadow, sizeof(info->shadow)); /* Stage 2: Set up free list. */ memset(&info->shadow, 0, sizeof(info->shadow)); -- 1.7.10.4
2011 Feb 04
5
[PATCH] kdump: introduce "reset_devices" command line option
upstream commit 7e96287ddc4f42081e18248b6167041c0908004c Author: Vivek Goyal <vgoyal@in.ibm.com> [PATCH] kdump: introduce "reset_devices" command line option Resetting the devices during driver initialization can be a costly operation in terms of time (especially scsi devices). This option can be used by drivers to know that user forcibly wants the devices to
2012 Oct 19
5
[PATCH v2 1/3] mm: highmem: export kmap_to_page for modules
Some virtio device drivers (9p) need to translate high virtual addresses to physical addresses, which are inserted into the virtqueue for processing by userspace. This patch exports the kmap_to_page symbol, so that the affected drivers can be compiled as modules. Signed-off-by: Will Deacon <will.deacon at arm.com> --- mm/highmem.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
2012 Oct 19
5
[PATCH v2 1/3] mm: highmem: export kmap_to_page for modules
Some virtio device drivers (9p) need to translate high virtual addresses to physical addresses, which are inserted into the virtqueue for processing by userspace. This patch exports the kmap_to_page symbol, so that the affected drivers can be compiled as modules. Signed-off-by: Will Deacon <will.deacon at arm.com> --- mm/highmem.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
2015 Dec 07
0
[PULL] vhost: cleanups and fixes
...------------- Michael S. Tsirkin (5): virtio-net: Stop doing DMA from the stack vhost: relax log address alignment tools/virtio: move list macro stubs tools/virtio: fix byteswap logic vhost: replace % with & on data path Michal Hocko (1): virtio: Do not drop __GFP_HIGH in alloc_indirect Suman Anna (1): virtio: fix memory leak of virtio ida cache layers Venkatesh Srinivas (1): virtio_ring: shadow available ring flags & index tools/virtio/linux/kernel.h | 6 +++++ tools/virtio/linux/virtio.h | 6 ----- tools/virtio/linux/virtio_c...
2015 Dec 07
0
[PULL] vhost: cleanups and fixes
...------------- Michael S. Tsirkin (5): virtio-net: Stop doing DMA from the stack vhost: relax log address alignment tools/virtio: move list macro stubs tools/virtio: fix byteswap logic vhost: replace % with & on data path Michal Hocko (1): virtio: Do not drop __GFP_HIGH in alloc_indirect Suman Anna (1): virtio: fix memory leak of virtio ida cache layers Venkatesh Srinivas (1): virtio_ring: shadow available ring flags & index tools/virtio/linux/kernel.h | 6 +++++ tools/virtio/linux/virtio.h | 6 ----- tools/virtio/linux/virtio_c...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...- } static void blkif_completion(struct blk_shadow *s) @@ -828,25 +837,24 @@ static int setup_blkring(struct xenbus_device *dev, struct blkif_sring *sring; int err; - info->ring_ref = GRANT_INVALID_REF; - - sring = (struct blkif_sring *)__get_free_page(GFP_NOIO | __GFP_HIGH); + sring = (struct blkif_sring *)__get_free_pages(GFP_NOIO | __GFP_HIGH, + info->ring_order); if (!sring) { xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring"); return -ENOMEM;...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...- } static void blkif_completion(struct blk_shadow *s) @@ -828,25 +837,24 @@ static int setup_blkring(struct xenbus_device *dev, struct blkif_sring *sring; int err; - info->ring_ref = GRANT_INVALID_REF; - - sring = (struct blkif_sring *)__get_free_page(GFP_NOIO | __GFP_HIGH); + sring = (struct blkif_sring *)__get_free_pages(GFP_NOIO | __GFP_HIGH, + info->ring_order); if (!sring) { xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring"); return -ENOMEM;...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...- } static void blkif_completion(struct blk_shadow *s) @@ -828,25 +837,24 @@ static int setup_blkring(struct xenbus_device *dev, struct blkif_sring *sring; int err; - info->ring_ref = GRANT_INVALID_REF; - - sring = (struct blkif_sring *)__get_free_page(GFP_NOIO | __GFP_HIGH); + sring = (struct blkif_sring *)__get_free_pages(GFP_NOIO | __GFP_HIGH, + info->ring_order); if (!sring) { xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring"); return -ENOMEM;...
2013 Feb 24
3
[PATCH dontapply 0/2] tools/virtio updates for API testing
Here's a patchset to update tools/virtio with changes in 3.8, as well as the proposed API extension. Useful to see whether the extra level of indirection adds measureable overhead. I will upstream at least patch 1 soon. Michael S. Tsirkin (2): tools/virtio: fix build for 3.8 tools/virtio: update for the new virtio API drivers/vhost/test.c | 4 +++- tools/virtio/Makefile
2013 Feb 24
3
[PATCH dontapply 0/2] tools/virtio updates for API testing
Here's a patchset to update tools/virtio with changes in 3.8, as well as the proposed API extension. Useful to see whether the extra level of indirection adds measureable overhead. I will upstream at least patch 1 soon. Michael S. Tsirkin (2): tools/virtio: fix build for 3.8 tools/virtio: update for the new virtio API drivers/vhost/test.c | 4 +++- tools/virtio/Makefile
2014 Sep 03
0
[PATCH 3/3] virtio_ring: unify direct/indirect code paths.
...truct vring_desc *desc; - unsigned head; - struct scatterlist *sg; - int i, n; + struct vring_desc *desc; + unsigned int i; /* * We require lowmem mappings for the descriptors because @@ -119,51 +111,13 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq, */ gfp &= ~(__GFP_HIGHMEM | __GFP_HIGH); - desc = kmalloc(total_sg * sizeof(struct vring_desc), gfp); - if (!desc) - return -ENOMEM; - - /* Transfer entries from the sg lists into the indirect page */ - i = 0; - for (n = 0; n < out_sgs; n++) { - for (sg = sgs[n]; sg; sg = sg_next(sg)) { - desc[i].flags = VRING_D...
2014 Apr 13
1
[PATCH] tools: Consolidate types.h
...<stdbool.h> #include <stddef.h> +#include <stdint.h> #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ #include <asm/types.h> @@ -10,10 +11,22 @@ struct page; struct kmem_cache; -typedef unsigned gfp_t; +typedef enum { + GFP_KERNEL, + GFP_ATOMIC, + __GFP_HIGHMEM, + __GFP_HIGH +} gfp_t; -typedef __u64 u64; -typedef __s64 s64; +/* + * We define u64 as uint64_t for every architecture + * so that we can print it with "%"PRIx64 without getting warnings. + * + * typedef __u64 u64; + * typedef __s64 s64; + */ +typedef uint64_t u64; +typedef int64_t...
2014 Apr 13
1
[PATCH] tools: Consolidate types.h
...<stdbool.h> #include <stddef.h> +#include <stdint.h> #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ #include <asm/types.h> @@ -10,10 +11,22 @@ struct page; struct kmem_cache; -typedef unsigned gfp_t; +typedef enum { + GFP_KERNEL, + GFP_ATOMIC, + __GFP_HIGHMEM, + __GFP_HIGH +} gfp_t; -typedef __u64 u64; -typedef __s64 s64; +/* + * We define u64 as uint64_t for every architecture + * so that we can print it with "%"PRIx64 without getting warnings. + * + * typedef __u64 u64; + * typedef __s64 s64; + */ +typedef uint64_t u64; +typedef int64_t...
2014 Apr 11
2
[PATCH] tools: Unify export.h
On Thu, Apr 10, 2014 at 07:38:05PM +0200, Borislav Petkov wrote: > Rebased onto current acme/perf/core: > > -- > From: Borislav Petkov <bp at suse.de> > Date: Sun, 23 Feb 2014 12:04:53 +0100 > Subject: [PATCH] tools: Unify export.h > > So tools/ has been growing three, at a different stage of their > development export.h headers and so we should unite into one.