IB/mlx5: Improve ODP debugging messages

Add and modify debug messages to ODP related error flows.
In that context, return code EAGAIN is considered less severe and print
level for it is set debug instead of warn.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
Moni Shoua 2018-11-08 21:10:17 +02:00 committed by Leon Romanovsky
parent 90290db766
commit b02394aa75
2 changed files with 14 additions and 4 deletions

View File

@ -655,8 +655,13 @@ int ib_umem_odp_map_dma_pages(struct ib_umem_odp *umem_odp, u64 user_virt,
flags, local_page_list, NULL, NULL); flags, local_page_list, NULL, NULL);
up_read(&owning_mm->mmap_sem); up_read(&owning_mm->mmap_sem);
if (npages < 0) if (npages < 0) {
if (npages != -EAGAIN)
pr_warn("fail to get %zu user pages with error %d\n", gup_num_pages, npages);
else
pr_debug("fail to get %zu user pages with error %d\n", gup_num_pages, npages);
break; break;
}
bcnt -= min_t(size_t, npages << PAGE_SHIFT, bcnt); bcnt -= min_t(size_t, npages << PAGE_SHIFT, bcnt);
mutex_lock(&umem_odp->umem_mutex); mutex_lock(&umem_odp->umem_mutex);
@ -674,8 +679,13 @@ int ib_umem_odp_map_dma_pages(struct ib_umem_odp *umem_odp, u64 user_virt,
ret = ib_umem_odp_map_dma_single_page( ret = ib_umem_odp_map_dma_single_page(
umem_odp, k, local_page_list[j], umem_odp, k, local_page_list[j],
access_mask, current_seq); access_mask, current_seq);
if (ret < 0) if (ret < 0) {
if (ret != -EAGAIN)
pr_warn("ib_umem_odp_map_dma_single_page failed with error %d\n", ret);
else
pr_debug("ib_umem_odp_map_dma_single_page failed with error %d\n", ret);
break; break;
}
p = page_to_phys(local_page_list[j]); p = page_to_phys(local_page_list[j]);
k++; k++;

View File

@ -607,8 +607,8 @@ out:
if (!wait_for_completion_timeout( if (!wait_for_completion_timeout(
&odp->notifier_completion, &odp->notifier_completion,
timeout)) { timeout)) {
mlx5_ib_warn(dev, "timeout waiting for mmu notifier. seq %d against %d\n", mlx5_ib_warn(dev, "timeout waiting for mmu notifier. seq %d against %d. notifiers_count=%d\n",
current_seq, odp->notifiers_seq); current_seq, odp->notifiers_seq, odp->notifiers_count);
} }
} else { } else {
/* The MR is being killed, kill the QP as well. */ /* The MR is being killed, kill the QP as well. */