search for: kmalloc_max_size

Displaying 6 results from an estimated 6 matches for "kmalloc_max_size".

2018 Mar 20
1
[PATCH] ptr_ring: fix build
...rtio/ringtest/ptr_ring.c index 477899c..2d566fb 100644 --- a/tools/virtio/ringtest/ptr_ring.c +++ b/tools/virtio/ringtest/ptr_ring.c @@ -17,6 +17,8 @@ #define likely(x) (__builtin_expect(!!(x), 1)) #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) #define SIZE_MAX (~(size_t)0) +#define KMALLOC_MAX_SIZE SIZE_MAX +#define BUG_ON(x) assert(x) typedef pthread_spinlock_t spinlock_t; @@ -57,6 +59,9 @@ static void kfree(void *p) free(p); } +#define kvmalloc_array kmalloc_array +#define kvfree kfree + static void spin_lock_init(spinlock_t *lock) { int r = pthread_spin_init(lock, 0); -- M...
2018 Jul 10
4
[PATCH v35 1/5] mm: support to get hints of free page blocks
NAK. On Tue, Jul 10, 2018 at 2:56 AM Wei Wang <wei.w.wang at intel.com> wrote: > > + > + buf_page = list_first_entry_or_null(pages, struct page, lru); > + if (!buf_page) > + return -EINVAL; > + buf = (__le64 *)page_address(buf_page); Stop this garbage. Why the hell would you pass in some crazy "liost of pages" that uses that lru
2018 Jul 10
4
[PATCH v35 1/5] mm: support to get hints of free page blocks
NAK. On Tue, Jul 10, 2018 at 2:56 AM Wei Wang <wei.w.wang at intel.com> wrote: > > + > + buf_page = list_first_entry_or_null(pages, struct page, lru); > + if (!buf_page) > + return -EINVAL; > + buf = (__le64 *)page_address(buf_page); Stop this garbage. Why the hell would you pass in some crazy "liost of pages" that uses that lru
2018 Jul 11
0
[PATCH v35 1/5] mm: support to get hints of free page blocks
...heard an explanation for why you want so many > pages in the first place, and why you want anything but MAX_ORDER-1. Sorry for missing that explanation. We only get addresses of the "MAX_ORDER-1" blocks into the array. The max size of the array that could be allocated by kmalloc is KMALLOC_MAX_SIZE (i.e. 4MB on x86). With that max array, we could load "4MB / sizeof(u64)" addresses of "MAX_ORDER-1" blocks, that is, 2TB free memory at most. We thought about removing that 2TB limitation by passing in multiple such max arrays (a list of them). But 2TB has been enough for o...
2018 Jul 11
3
[PATCH v35 1/5] mm: support to get hints of free page blocks
On Tue, Jul 10, 2018 at 6:24 PM Wei Wang <wei.w.wang at intel.com> wrote: > > We only get addresses of the "MAX_ORDER-1" blocks into the array. The > max size of the array that could be allocated by kmalloc is > KMALLOC_MAX_SIZE (i.e. 4MB on x86). With that max array, we could load > "4MB / sizeof(u64)" addresses of "MAX_ORDER-1" blocks, that is, 2TB free > memory at most. We thought about removing that 2TB limitation by passing > in multiple such max arrays (a list of them). No. Stop this al...
2018 Jul 11
3
[PATCH v35 1/5] mm: support to get hints of free page blocks
On Tue, Jul 10, 2018 at 6:24 PM Wei Wang <wei.w.wang at intel.com> wrote: > > We only get addresses of the "MAX_ORDER-1" blocks into the array. The > max size of the array that could be allocated by kmalloc is > KMALLOC_MAX_SIZE (i.e. 4MB on x86). With that max array, we could load > "4MB / sizeof(u64)" addresses of "MAX_ORDER-1" blocks, that is, 2TB free > memory at most. We thought about removing that 2TB limitation by passing > in multiple such max arrays (a list of them). No. Stop this al...