Contributors: 9
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Linus Torvalds |
82 |
65.08% |
1 |
8.33% |
| David Chinner |
19 |
15.08% |
3 |
25.00% |
| Tetsuo Handa |
8 |
6.35% |
1 |
8.33% |
| Eric Sandeen |
7 |
5.56% |
1 |
8.33% |
| Andrew Morton |
4 |
3.17% |
1 |
8.33% |
| Ingo Molnar |
2 |
1.59% |
1 |
8.33% |
| Al Viro |
2 |
1.59% |
2 |
16.67% |
| Jens Axboe |
1 |
0.79% |
1 |
8.33% |
| Harvey Harrison |
1 |
0.79% |
1 |
8.33% |
| Total |
126 |
|
12 |
|
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
*/
#include "xfs.h"
#include <linux/backing-dev.h>
#include "xfs_message.h"
#include "xfs_trace.h"
void *
kmem_alloc(size_t size, xfs_km_flags_t flags)
{
int retries = 0;
gfp_t lflags = kmem_flags_convert(flags);
void *ptr;
trace_kmem_alloc(size, flags, _RET_IP_);
do {
ptr = kmalloc(size, lflags);
if (ptr || (flags & KM_MAYFAIL))
return ptr;
if (!(++retries % 100))
xfs_err(NULL,
"%s(%u) possible memory allocation deadlock size %u in %s (mode:0x%x)",
current->comm, current->pid,
(unsigned int)size, __func__, lflags);
congestion_wait(BLK_RW_ASYNC, HZ/50);
} while (1);
}