mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
xen/grant-table: log the lack of grants
log a message when we enter this situation: 1) we already allocated the max number of available grants from hypervisor and 2) we still need more (but the request fails because of 1)). Sometimes the lack of grants causes IO hangs in xen_blkfront devices. Adding this log would help debuging. Signed-off-by: Wengang Wang <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Reviewed-by: Junxiao Bi <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
This commit is contained in:
parent
0e4d394fe5
commit
29d11cfd86
1 changed files with 8 additions and 1 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/ratelimit.h>
|
||||
|
||||
#include <xen/xen.h>
|
||||
#include <xen/interface/xen.h>
|
||||
|
|
@ -1072,8 +1073,14 @@ static int gnttab_expand(unsigned int req_entries)
|
|||
cur = nr_grant_frames;
|
||||
extra = ((req_entries + (grefs_per_grant_frame-1)) /
|
||||
grefs_per_grant_frame);
|
||||
if (cur + extra > gnttab_max_grant_frames())
|
||||
if (cur + extra > gnttab_max_grant_frames()) {
|
||||
pr_warn_ratelimited("xen/grant-table: max_grant_frames reached"
|
||||
" cur=%u extra=%u limit=%u"
|
||||
" gnttab_free_count=%u req_entries=%u\n",
|
||||
cur, extra, gnttab_max_grant_frames(),
|
||||
gnttab_free_count, req_entries);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
rc = gnttab_map(cur, cur + extra - 1);
|
||||
if (rc == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue