diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2014-05-11 08:15:12 -0400 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2014-06-02 17:58:11 -0400 |
| commit | 40f2287bd583f4df4c602c1a29a48df2730fb6d4 (patch) | |
| tree | d3dcabe51b5821b1334ea656f6d2166fcf732a18 /include/linux | |
| parent | 09b93088d75009807b72293f26e2634430ce5ba9 (diff) | |
IB/mlx4: Implement IB_QP_CREATE_USE_GFP_NOIO
Modify the various routines used to allocate memory resources which
serve QPs in mlx4 to get an input GFP directive. Have the Ethernet
driver to use GFP_KERNEL in it's QP allocations as done prior to this
commit, and the IB driver to use GFP_NOIO when the IB verbs
IB_QP_CREATE_USE_GFP_NOIO QP creation flag is provided.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/device.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index ba87bd21295a..be60b002bb37 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -837,7 +837,7 @@ static inline int mlx4_is_slave(struct mlx4_dev *dev) | |||
| 837 | } | 837 | } |
| 838 | 838 | ||
| 839 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 839 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
| 840 | struct mlx4_buf *buf); | 840 | struct mlx4_buf *buf, gfp_t gfp); |
| 841 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 841 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
| 842 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) | 842 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) |
| 843 | { | 843 | { |
| @@ -874,9 +874,10 @@ int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_mw *mw); | |||
| 874 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 874 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
| 875 | int start_index, int npages, u64 *page_list); | 875 | int start_index, int npages, u64 *page_list); |
| 876 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 876 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
| 877 | struct mlx4_buf *buf); | 877 | struct mlx4_buf *buf, gfp_t gfp); |
| 878 | 878 | ||
| 879 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order); | 879 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order, |
| 880 | gfp_t gfp); | ||
| 880 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); | 881 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); |
| 881 | 882 | ||
| 882 | int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, | 883 | int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, |
| @@ -892,7 +893,8 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); | |||
| 892 | int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base); | 893 | int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base); |
| 893 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt); | 894 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt); |
| 894 | 895 | ||
| 895 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp); | 896 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, |
| 897 | gfp_t gfp); | ||
| 896 | void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp); | 898 | void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp); |
| 897 | 899 | ||
| 898 | int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcdn, | 900 | int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcdn, |
