diff options
author | Mitko Haralanov <mitko.haralanov@intel.com> | 2016-02-03 14:37:06 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:37:59 -0500 |
commit | 0840aea98cdf9024aff7f69e1167c4648665d48b (patch) | |
tree | d56bcf4c57d43cc38577ed7ef963aa24a02182f9 /drivers/staging/rdma/hfi1/user_sdma.h | |
parent | staging/rdma/hfi1, IB/core: Fix LinkDownReason define for consistency (diff) | |
download | linux-dev-0840aea98cdf9024aff7f69e1167c4648665d48b.tar.xz linux-dev-0840aea98cdf9024aff7f69e1167c4648665d48b.zip |
staging/rdma/hfi1: Improve performance of user SDMA
To facilitate locked page counting, the user SDMA
routines would maintain a list of io vectors, which
were freed in the completion callback and then unpin
the associated pages during the next call into the
kernel.
Since the size of this list was unbounded, doing this
was bad for performance because the driver ended up
spending too much time freeing the io vectors.
This commit changes how the io vector freeing is done
by moving the actual page unpinning in the callback and
maintaining a count of unpinned pages. This count can
then be used during the next call into the kernel to
update the mm->pinned_vm variable (since that requires
process context and the ability to sleep.)
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/user_sdma.h')
-rw-r--r-- | drivers/staging/rdma/hfi1/user_sdma.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/user_sdma.h b/drivers/staging/rdma/hfi1/user_sdma.h index 317f0e8cffb6..7ef31a6b6dbe 100644 --- a/drivers/staging/rdma/hfi1/user_sdma.h +++ b/drivers/staging/rdma/hfi1/user_sdma.h @@ -5,7 +5,7 @@ * * GPL LICENSE SUMMARY * - * Copyright(c) 2015 Intel Corporation. + * Copyright(c) 2015, 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -18,7 +18,7 @@ * * BSD LICENSE * - * Copyright(c) 2015 Intel Corporation. + * Copyright(c) 2015, 2016 Intel Corporation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -69,8 +69,7 @@ struct hfi1_user_sdma_pkt_q { struct iowait busy; unsigned state; wait_queue_head_t wait; - struct list_head iovec_list; - spinlock_t iovec_lock; /* protect iovec_list */ + unsigned long unpinned; }; struct hfi1_user_sdma_comp_q { |