diff mbox series

[net-next,2/2] rds: add sysctl for rds support of On-Demand-Paging

Message ID 1556239470-26908-3-git-send-email-santosh.shilimkar@oracle.com
State Changes Requested
Delegated to: David Miller
Headers show
Series rds: handle unsupported rdma request to fs dax memory | expand

Commit Message

Santosh Shilimkar April 26, 2019, 12:44 a.m. UTC
RDS doesn't support RDMA on memory apertures that require On Demand
Paging (ODP), such as FS DAX memory. A sysctl is added to indicate
whether RDMA requiring ODP is supported.

Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-tested-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
 net/rds/ib.h        | 1 +
 net/rds/ib_sysctl.c | 8 ++++++++
 2 files changed, 9 insertions(+)

Comments

Zhu Yanjun April 26, 2019, 2:37 a.m. UTC | #1
On 2019/4/26 8:44, Santosh Shilimkar wrote:
> RDS doesn't support RDMA on memory apertures that require On Demand
> Paging (ODP), such as FS DAX memory. A sysctl is added to indicate
> whether RDMA requiring ODP is supported.
>
> Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
> Reviewed-tested-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Thanks, Santosh

Zhu Yanjun

> Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> ---
>   net/rds/ib.h        | 1 +
>   net/rds/ib_sysctl.c | 8 ++++++++
>   2 files changed, 9 insertions(+)
>
> diff --git a/net/rds/ib.h b/net/rds/ib.h
> index 67a715b..80e11ef 100644
> --- a/net/rds/ib.h
> +++ b/net/rds/ib.h
> @@ -457,5 +457,6 @@ unsigned int rds_ib_stats_info_copy(struct rds_info_iterator *iter,
>   extern unsigned long rds_ib_sysctl_max_unsig_bytes;
>   extern unsigned long rds_ib_sysctl_max_recv_allocation;
>   extern unsigned int rds_ib_sysctl_flow_control;
> +extern unsigned int rds_ib_sysctl_odp_support;
>   
>   #endif
> diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
> index e4e41b3..7cc02cd 100644
> --- a/net/rds/ib_sysctl.c
> +++ b/net/rds/ib_sysctl.c
> @@ -60,6 +60,7 @@
>    * will cause credits to be added before protocol negotiation.
>    */
>   unsigned int rds_ib_sysctl_flow_control = 0;
> +unsigned int rds_ib_sysctl_odp_support;
>   
>   static struct ctl_table rds_ib_sysctl_table[] = {
>   	{
> @@ -103,6 +104,13 @@
>   		.mode		= 0644,
>   		.proc_handler	= proc_dointvec,
>   	},
> +	{
> +		.procname       = "odp_support",
> +		.data           = &rds_ib_sysctl_odp_support,
> +		.maxlen         = sizeof(rds_ib_sysctl_odp_support),
> +		.mode           = 0444,
> +		.proc_handler   = proc_dointvec,
> +	},
>   	{ }
>   };
>
diff mbox series

Patch

diff --git a/net/rds/ib.h b/net/rds/ib.h
index 67a715b..80e11ef 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -457,5 +457,6 @@  unsigned int rds_ib_stats_info_copy(struct rds_info_iterator *iter,
 extern unsigned long rds_ib_sysctl_max_unsig_bytes;
 extern unsigned long rds_ib_sysctl_max_recv_allocation;
 extern unsigned int rds_ib_sysctl_flow_control;
+extern unsigned int rds_ib_sysctl_odp_support;
 
 #endif
diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
index e4e41b3..7cc02cd 100644
--- a/net/rds/ib_sysctl.c
+++ b/net/rds/ib_sysctl.c
@@ -60,6 +60,7 @@ 
  * will cause credits to be added before protocol negotiation.
  */
 unsigned int rds_ib_sysctl_flow_control = 0;
+unsigned int rds_ib_sysctl_odp_support;
 
 static struct ctl_table rds_ib_sysctl_table[] = {
 	{
@@ -103,6 +104,13 @@ 
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
+	{
+		.procname       = "odp_support",
+		.data           = &rds_ib_sysctl_odp_support,
+		.maxlen         = sizeof(rds_ib_sysctl_odp_support),
+		.mode           = 0444,
+		.proc_handler   = proc_dointvec,
+	},
 	{ }
 };