* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
[not found] <ed54708d-990e-4c8f-8057-50a70f93d3d8@default>
@ 2012-01-05 17:05 ` Thadeu Lima de Souza Cascardo
2012-01-05 18:57 ` David Miller
2012-01-06 15:57 ` Thadeu Lima de Souza Cascardo
0 siblings, 2 replies; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-05 17:05 UTC (permalink / raw)
To: Venkat Venkatsubra
Cc: davem, netdev, linux-kernel, dledford, Jes.Sorensen, rds-devel
> ----- Original Message -----
> From: cascardo@linux.vnet.ibm.com
> To: venkat.x.venkatsubra@oracle.com
> Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cascardo@linux.vnet.ibm.com, dledford@redhat.com, Jes.Sorensen@redhat.com, rds-devel@oss.oracle.com
> Sent: Wednesday, January 4, 2012 4:03:42 PM GMT -06:00 US/Canada Central
> Subject: [PATCH] rds_rdma: don't assume infiniband device is PCI
>
> RDS code assumes that the struct ib_device dma_device member, which is a
> pointer, points to a struct device embedded in a struct pci_dev.
>
> This is not the case for ehca, for example, which is a OF driver, and
> makes dma_device point to a struct device embedded in a struct
> platform_device.
>
> This will make the system crash when rds_rdma is loaded in a system
> with ehca, since it will try to access the bus member of a non-existent
> struct pci_dev.
>
> The only reason rds_rdma uses the struct pci_dev is to get the NUMA node
> the device is attached to. Using dev_to_node for that is much better,
> since it won't assume which bus the infiniband is attached to.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Cc: dledford@redhat.com
> Cc: Jes.Sorensen@redhat.com
> Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
> Cc: rds-devel@oss.oracle.com
> ---
> net/rds/ib.h | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/net/rds/ib.h b/net/rds/ib.h
> index edfaaaf..8d2b3d5 100644
> --- a/net/rds/ib.h
> +++ b/net/rds/ib.h
> @@ -186,8 +186,7 @@ struct rds_ib_device {
> struct work_struct free_work;
> };
>
> -#define pcidev_to_node(pcidev) pcibus_to_node(pcidev->bus)
> -#define ibdev_to_node(ibdev) pcidev_to_node(to_pci_dev(ibdev->dma_device))
> +#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device)
> #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
>
> /* bits for i_ack_flags */
> --
> 1.7.4.4
>
On Thu, Jan 05, 2012 at 08:56:34AM -0800, Venkat Venkatsubra wrote:
> Hi Cascardo,
>
> Your changes look good to me.
> But our latest code doesn't use this rdsibdev_to_node macro anywhere.
> Checking with the people in my group who know the history of the NUMA feature.
> Trying to find out if the call to kzalloc_node() can be replaced by kzalloc().
> In which case this macro can be removed.
>
> I will keep you posted.
>
> Venkat
>
Hi, Venkat.
Do you have any public tree where we can track the last changes in RDS?
Note that I have changed ibsdev_to_node, which rdsibdev_to_node makes
use of. Anyway, replacing kzalloc_node with kzalloc has crossed my mind,
but since I was not sure if this would affect latency of RDS in any use
cases, I kept that and used a better function to get the node from the
device. And we have dev_to_node since 2.6.20, so it should not be a
problem to use it.
If possible, keep everyone copied and avoid top posting.
Regards.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-05 17:05 ` [PATCH] rds_rdma: don't assume infiniband device is PCI Thadeu Lima de Souza Cascardo
@ 2012-01-05 18:57 ` David Miller
2012-01-06 15:57 ` Thadeu Lima de Souza Cascardo
1 sibling, 0 replies; 14+ messages in thread
From: David Miller @ 2012-01-05 18:57 UTC (permalink / raw)
To: cascardo
Cc: venkat.x.venkatsubra, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Thu, 5 Jan 2012 15:05:24 -0200
> On Thu, Jan 05, 2012 at 08:56:34AM -0800, Venkat Venkatsubra wrote:
>> Hi Cascardo,
>>
>> Your changes look good to me.
>> But our latest code doesn't use this rdsibdev_to_node macro anywhere.
>> Checking with the people in my group who know the history of the NUMA feature.
>> Trying to find out if the call to kzalloc_node() can be replaced by kzalloc().
>> In which case this macro can be removed.
>>
>> I will keep you posted.
>>
>> Venkat
>>
>
> Hi, Venkat.
>
> Do you have any public tree where we can track the last changes in RDS?
> Note that I have changed ibsdev_to_node, which rdsibdev_to_node makes
> use of. Anyway, replacing kzalloc_node with kzalloc has crossed my mind,
> but since I was not sure if this would affect latency of RDS in any use
> cases, I kept that and used a better function to get the node from the
> device. And we have dev_to_node since 2.6.20, so it should not be a
> problem to use it.
>
> If possible, keep everyone copied and avoid top posting.
Indeed, otherwise it's impossible for anyone to follow the progress on
this patch. If anything, you should never remove netdev from the CC:
list when discussing a patch. Otherwise the followups don't make into
our patch tracking system at:
http://patchwork.ozlabs.org/project/netdev/list/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-05 17:05 ` [PATCH] rds_rdma: don't assume infiniband device is PCI Thadeu Lima de Souza Cascardo
2012-01-05 18:57 ` David Miller
@ 2012-01-06 15:57 ` Thadeu Lima de Souza Cascardo
2012-01-06 17:43 ` Thadeu Lima de Souza Cascardo
1 sibling, 1 reply; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-06 15:57 UTC (permalink / raw)
To: Venkat Venkatsubra
Cc: davem, netdev, linux-kernel, dledford, Jes.Sorensen, rds-devel
On Thu, Jan 05, 2012 at 03:05:24PM -0200, Thadeu Lima de Souza Cascardo wrote:
> > ----- Original Message -----
> > From: cascardo@linux.vnet.ibm.com
> > To: venkat.x.venkatsubra@oracle.com
> > Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cascardo@linux.vnet.ibm.com, dledford@redhat.com, Jes.Sorensen@redhat.com, rds-devel@oss.oracle.com
> > Sent: Wednesday, January 4, 2012 4:03:42 PM GMT -06:00 US/Canada Central
> > Subject: [PATCH] rds_rdma: don't assume infiniband device is PCI
> >
> > RDS code assumes that the struct ib_device dma_device member, which is a
> > pointer, points to a struct device embedded in a struct pci_dev.
> >
> > This is not the case for ehca, for example, which is a OF driver, and
> > makes dma_device point to a struct device embedded in a struct
> > platform_device.
> >
> > This will make the system crash when rds_rdma is loaded in a system
> > with ehca, since it will try to access the bus member of a non-existent
> > struct pci_dev.
> >
> > The only reason rds_rdma uses the struct pci_dev is to get the NUMA node
> > the device is attached to. Using dev_to_node for that is much better,
> > since it won't assume which bus the infiniband is attached to.
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> > Cc: dledford@redhat.com
> > Cc: Jes.Sorensen@redhat.com
> > Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
> > Cc: rds-devel@oss.oracle.com
> > ---
> > net/rds/ib.h | 3 +--
> > 1 files changed, 1 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/rds/ib.h b/net/rds/ib.h
> > index edfaaaf..8d2b3d5 100644
> > --- a/net/rds/ib.h
> > +++ b/net/rds/ib.h
> > @@ -186,8 +186,7 @@ struct rds_ib_device {
> > struct work_struct free_work;
> > };
> >
> > -#define pcidev_to_node(pcidev) pcibus_to_node(pcidev->bus)
> > -#define ibdev_to_node(ibdev) pcidev_to_node(to_pci_dev(ibdev->dma_device))
> > +#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device)
> > #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
> >
> > /* bits for i_ack_flags */
> > --
> > 1.7.4.4
> >
>
> On Thu, Jan 05, 2012 at 08:56:34AM -0800, Venkat Venkatsubra wrote:
> > Hi Cascardo,
> >
> > Your changes look good to me.
> > But our latest code doesn't use this rdsibdev_to_node macro anywhere.
> > Checking with the people in my group who know the history of the NUMA feature.
> > Trying to find out if the call to kzalloc_node() can be replaced by kzalloc().
> > In which case this macro can be removed.
> >
> > I will keep you posted.
> >
> > Venkat
> >
>
> Hi, Venkat.
>
> Do you have any public tree where we can track the last changes in RDS?
> Note that I have changed ibsdev_to_node, which rdsibdev_to_node makes
> use of. Anyway, replacing kzalloc_node with kzalloc has crossed my mind,
> but since I was not sure if this would affect latency of RDS in any use
> cases, I kept that and used a better function to get the node from the
> device. And we have dev_to_node since 2.6.20, so it should not be a
> problem to use it.
>
> If possible, keep everyone copied and avoid top posting.
>
> Regards.
> Cascardo.
Just to make it clean, ibdev_to_node is used in Linus' tree and
next/master as of today and this patch fixes a real oops. I should have
probably added the stack trace in the log message. For completion, here
it is, running 3.2.0-rc7-00039-g89307ba:
NET: Registered protocol family 21
Registered RDS/iwarp transport
Unable to handle kernel paging request for data at address 0x00000088
Faulting instruction address: 0xc0000000000336d0
cpu 0x6: Vector: 300 (Data Access) at [c0000000ddd837e0]
pc: c0000000000336d0: .pcibus_to_node+0x0/0x10
lr: d000000004590de0: .rds_ib_add_one+0x100/0x360 [rds_rdma]
sp: c0000000ddd83a60
msr: 8000000000009032
dar: 88
dsisr: 40000000
current = 0xc0000000ee6c0000
paca = 0xc000000006c32d00
pid = 8574, comm = modprobe
enter ? for help
[link register ] d000000004590de0 .rds_ib_add_one+0x100/0x360
[rds_rdma]
[c0000000ddd83a60] d000000004590d88 .rds_ib_add_one+0xa8/0x360
[rds_rdma] (unreliable)
[c0000000ddd83b10] d000000003195240 .ib_register_client+0xc0/0x120
[ib_core]
[c0000000ddd83bb0] d00000000459074c .rds_ib_init+0x2c/0xf0 [rds_rdma]
[c0000000ddd83c30] d000000004590144 .rds_rdma_init+0xe4/0x180 [rds_rdma]
[c0000000ddd83cd0] c00000000000aa54 .do_one_initcall+0x64/0x1e0
[c0000000ddd83d90] c0000000000d359c .SyS_init_module+0xcc/0x220
[c0000000ddd83e30] c0000000000097e4 syscall_exit+0x0/0x40
--- Exception: c00 (System Call) at 00000fff7dc3d3d8
SP (fffe87eeeb0) is in userspace
Regards.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-06 15:57 ` Thadeu Lima de Souza Cascardo
@ 2012-01-06 17:43 ` Thadeu Lima de Souza Cascardo
0 siblings, 0 replies; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-06 17:43 UTC (permalink / raw)
To: Venkat Venkatsubra
Cc: davem, netdev, linux-kernel, dledford, Jes.Sorensen, rds-devel
On Fri, Jan 06, 2012 at 01:57:50PM -0200, Thadeu Lima de Souza Cascardo wrote:
> On Thu, Jan 05, 2012 at 03:05:24PM -0200, Thadeu Lima de Souza Cascardo wrote:
> > > ----- Original Message -----
> > > From: cascardo@linux.vnet.ibm.com
> > > To: venkat.x.venkatsubra@oracle.com
> > > Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cascardo@linux.vnet.ibm.com, dledford@redhat.com, Jes.Sorensen@redhat.com, rds-devel@oss.oracle.com
> > > Sent: Wednesday, January 4, 2012 4:03:42 PM GMT -06:00 US/Canada Central
> > > Subject: [PATCH] rds_rdma: don't assume infiniband device is PCI
> > >
> > > RDS code assumes that the struct ib_device dma_device member, which is a
> > > pointer, points to a struct device embedded in a struct pci_dev.
> > >
> > > This is not the case for ehca, for example, which is a OF driver, and
> > > makes dma_device point to a struct device embedded in a struct
> > > platform_device.
> > >
> > > This will make the system crash when rds_rdma is loaded in a system
> > > with ehca, since it will try to access the bus member of a non-existent
> > > struct pci_dev.
> > >
> > > The only reason rds_rdma uses the struct pci_dev is to get the NUMA node
> > > the device is attached to. Using dev_to_node for that is much better,
> > > since it won't assume which bus the infiniband is attached to.
> > >
> > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> > > Cc: dledford@redhat.com
> > > Cc: Jes.Sorensen@redhat.com
> > > Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
> > > Cc: rds-devel@oss.oracle.com
> > > ---
> > > net/rds/ib.h | 3 +--
> > > 1 files changed, 1 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/net/rds/ib.h b/net/rds/ib.h
> > > index edfaaaf..8d2b3d5 100644
> > > --- a/net/rds/ib.h
> > > +++ b/net/rds/ib.h
> > > @@ -186,8 +186,7 @@ struct rds_ib_device {
> > > struct work_struct free_work;
> > > };
> > >
> > > -#define pcidev_to_node(pcidev) pcibus_to_node(pcidev->bus)
> > > -#define ibdev_to_node(ibdev) pcidev_to_node(to_pci_dev(ibdev->dma_device))
> > > +#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device)
> > > #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
> > >
> > > /* bits for i_ack_flags */
> > > --
> > > 1.7.4.4
> > >
> >
> > On Thu, Jan 05, 2012 at 08:56:34AM -0800, Venkat Venkatsubra wrote:
> > > Hi Cascardo,
> > >
> > > Your changes look good to me.
> > > But our latest code doesn't use this rdsibdev_to_node macro anywhere.
> > > Checking with the people in my group who know the history of the NUMA feature.
> > > Trying to find out if the call to kzalloc_node() can be replaced by kzalloc().
> > > In which case this macro can be removed.
> > >
> > > I will keep you posted.
> > >
> > > Venkat
> > >
> >
> > Hi, Venkat.
> >
> > Do you have any public tree where we can track the last changes in RDS?
> > Note that I have changed ibsdev_to_node, which rdsibdev_to_node makes
> > use of. Anyway, replacing kzalloc_node with kzalloc has crossed my mind,
> > but since I was not sure if this would affect latency of RDS in any use
> > cases, I kept that and used a better function to get the node from the
> > device. And we have dev_to_node since 2.6.20, so it should not be a
> > problem to use it.
> >
> > If possible, keep everyone copied and avoid top posting.
> >
> > Regards.
> > Cascardo.
>
> Just to make it clean, ibdev_to_node is used in Linus' tree and
> next/master as of today and this patch fixes a real oops. I should have
> probably added the stack trace in the log message. For completion, here
> it is, running 3.2.0-rc7-00039-g89307ba:
>
> NET: Registered protocol family 21
> Registered RDS/iwarp transport
> Unable to handle kernel paging request for data at address 0x00000088
> Faulting instruction address: 0xc0000000000336d0
> cpu 0x6: Vector: 300 (Data Access) at [c0000000ddd837e0]
> pc: c0000000000336d0: .pcibus_to_node+0x0/0x10
> lr: d000000004590de0: .rds_ib_add_one+0x100/0x360 [rds_rdma]
> sp: c0000000ddd83a60
> msr: 8000000000009032
> dar: 88
> dsisr: 40000000
> current = 0xc0000000ee6c0000
> paca = 0xc000000006c32d00
> pid = 8574, comm = modprobe
> enter ? for help
> [link register ] d000000004590de0 .rds_ib_add_one+0x100/0x360
> [rds_rdma]
> [c0000000ddd83a60] d000000004590d88 .rds_ib_add_one+0xa8/0x360
> [rds_rdma] (unreliable)
> [c0000000ddd83b10] d000000003195240 .ib_register_client+0xc0/0x120
> [ib_core]
> [c0000000ddd83bb0] d00000000459074c .rds_ib_init+0x2c/0xf0 [rds_rdma]
> [c0000000ddd83c30] d000000004590144 .rds_rdma_init+0xe4/0x180 [rds_rdma]
> [c0000000ddd83cd0] c00000000000aa54 .do_one_initcall+0x64/0x1e0
> [c0000000ddd83d90] c0000000000d359c .SyS_init_module+0xcc/0x220
> [c0000000ddd83e30] c0000000000097e4 syscall_exit+0x0/0x40
> --- Exception: c00 (System Call) at 00000fff7dc3d3d8
> SP (fffe87eeeb0) is in userspace
>
> Regards.
> Cascardo.
>
David,
The References was broken by Venkat email, so patchwork is not catching
up the new messages in the thread. At least, that's what I expect it
uses. So, I am sending this message with a fixed References. Sorry for
that.
Regards.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-13 21:12 ` David Miller
@ 2012-01-13 21:21 ` Thadeu Lima de Souza Cascardo
0 siblings, 0 replies; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-13 21:21 UTC (permalink / raw)
To: David Miller
Cc: roland, venkat.x.venkatsubra, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
On Fri, Jan 13, 2012 at 01:12:48PM -0800, David Miller wrote:
> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Date: Fri, 13 Jan 2012 16:52:58 -0200
>
> > On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
> >> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> >> Date: Fri, 13 Jan 2012 16:17:06 -0200
> >>
> >> > Is this going through your tree? In patchwork, its state is "Not
> >> > Applicable".
> >>
> >> There was an active RDS maintainer, though I haven't seen patches
> >> from that person in a while.
> >>
> >
> > Hi, David.
> >
> > Venkat is the current RDS maintainer and he has Acked the patch.
>
> Not according to patchwork. I don't see him reply at all to the
> patch posting and give his explicit "Acked-by: "
>
Venkat,
Care to send an Acked-by using a different MUA? Yours sends no
In-Reply-To or References header field.
David,
This is the message Venkat has sent.
http://marc.info/?l=linux-netdev&m=132587819932339&w=2
Thanks.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-13 18:52 ` Thadeu Lima de Souza Cascardo
@ 2012-01-13 21:12 ` David Miller
2012-01-13 21:21 ` Thadeu Lima de Souza Cascardo
0 siblings, 1 reply; 14+ messages in thread
From: David Miller @ 2012-01-13 21:12 UTC (permalink / raw)
To: cascardo
Cc: roland, venkat.x.venkatsubra, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Fri, 13 Jan 2012 16:52:58 -0200
> On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
>> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>> Date: Fri, 13 Jan 2012 16:17:06 -0200
>>
>> > Is this going through your tree? In patchwork, its state is "Not
>> > Applicable".
>>
>> There was an active RDS maintainer, though I haven't seen patches
>> from that person in a while.
>>
>
> Hi, David.
>
> Venkat is the current RDS maintainer and he has Acked the patch.
Not according to patchwork. I don't see him reply at all to the
patch posting and give his explicit "Acked-by: "
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-13 18:25 ` David Miller
@ 2012-01-13 18:52 ` Thadeu Lima de Souza Cascardo
2012-01-13 21:12 ` David Miller
0 siblings, 1 reply; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-13 18:52 UTC (permalink / raw)
To: David Miller
Cc: roland, venkat.x.venkatsubra, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Date: Fri, 13 Jan 2012 16:17:06 -0200
>
> > Is this going through your tree? In patchwork, its state is "Not
> > Applicable".
>
> There was an active RDS maintainer, though I haven't seen patches
> from that person in a while.
>
Hi, David.
Venkat is the current RDS maintainer and he has Acked the patch.
Thanks.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-13 18:17 ` Thadeu Lima de Souza Cascardo
2012-01-13 18:25 ` David Miller
@ 2012-01-13 18:35 ` Roland Dreier
1 sibling, 0 replies; 14+ messages in thread
From: Roland Dreier @ 2012-01-13 18:35 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: venkat.x.venkatsubra, davem, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
On Fri, Jan 13, 2012 at 10:17 AM, Thadeu Lima de Souza Cascardo
<cascardo@linux.vnet.ibm.com> wrote:
>
> Hi, Roland.
>
> Sorry that I didn't include you. Should I include the infiniband users
> under net/ in the files that Infiniband maintainers take care of?
I don't maintain those things but I may have an opinion about them :)
- R.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-13 18:17 ` Thadeu Lima de Souza Cascardo
@ 2012-01-13 18:25 ` David Miller
2012-01-13 18:52 ` Thadeu Lima de Souza Cascardo
2012-01-13 18:35 ` Roland Dreier
1 sibling, 1 reply; 14+ messages in thread
From: David Miller @ 2012-01-13 18:25 UTC (permalink / raw)
To: cascardo
Cc: roland, venkat.x.venkatsubra, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Fri, 13 Jan 2012 16:17:06 -0200
> Is this going through your tree? In patchwork, its state is "Not
> Applicable".
There was an active RDS maintainer, though I haven't seen patches
from that person in a while.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-06 17:49 ` Roland Dreier
@ 2012-01-13 18:17 ` Thadeu Lima de Souza Cascardo
2012-01-13 18:25 ` David Miller
2012-01-13 18:35 ` Roland Dreier
0 siblings, 2 replies; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-13 18:17 UTC (permalink / raw)
To: Roland Dreier
Cc: venkat.x.venkatsubra, davem, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
On Fri, Jan 06, 2012 at 09:49:36AM -0800, Roland Dreier wrote:
> On Fri, Jan 6, 2012 at 9:47 AM, Roland Dreier <roland@purestorage.com> wrote:
> > Looks great to me:
>
> And BTW if Oracle has some non-published work they should probably just
> rebase it on top of this fix. We should merge this rather than shipping a
> kernel with an obvious know crash like this.
>
> - R.
>
Hi, Roland.
Sorry that I didn't include you. Should I include the infiniband users
under net/ in the files that Infiniband maintainers take care of?
David,
Is this going through your tree? In patchwork, its state is "Not
Applicable".
Thanks.
Cascardo.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
@ 2012-01-06 19:27 Venkat Venkatsubra
0 siblings, 0 replies; 14+ messages in thread
From: Venkat Venkatsubra @ 2012-01-06 19:27 UTC (permalink / raw)
To: roland
Cc: netdev, rds-devel, Jes.Sorensen, davem, cascardo, dledford, linux-kernel
Looks great to me:
Reviewed-by: Roland Dreier <roland@purestorage.com>
Acked-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-06 17:47 ` Roland Dreier
@ 2012-01-06 17:49 ` Roland Dreier
2012-01-13 18:17 ` Thadeu Lima de Souza Cascardo
0 siblings, 1 reply; 14+ messages in thread
From: Roland Dreier @ 2012-01-06 17:49 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: venkat.x.venkatsubra, davem, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
On Fri, Jan 6, 2012 at 9:47 AM, Roland Dreier <roland@purestorage.com> wrote:
> Looks great to me:
And BTW if Oracle has some non-published work they should probably just
rebase it on top of this fix. We should merge this rather than shipping a
kernel with an obvious know crash like this.
- R.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] rds_rdma: don't assume infiniband device is PCI
2012-01-04 22:03 Thadeu Lima de Souza Cascardo
@ 2012-01-06 17:47 ` Roland Dreier
2012-01-06 17:49 ` Roland Dreier
0 siblings, 1 reply; 14+ messages in thread
From: Roland Dreier @ 2012-01-06 17:47 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: venkat.x.venkatsubra, davem, netdev, linux-kernel, dledford,
Jes.Sorensen, rds-devel
Looks great to me:
Reviewed-by: Roland Dreier <roland@purestorage.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] rds_rdma: don't assume infiniband device is PCI
@ 2012-01-04 22:03 Thadeu Lima de Souza Cascardo
2012-01-06 17:47 ` Roland Dreier
0 siblings, 1 reply; 14+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-01-04 22:03 UTC (permalink / raw)
To: venkat.x.venkatsubra
Cc: davem, netdev, linux-kernel, Thadeu Lima de Souza Cascardo,
dledford, Jes.Sorensen, rds-devel
RDS code assumes that the struct ib_device dma_device member, which is a
pointer, points to a struct device embedded in a struct pci_dev.
This is not the case for ehca, for example, which is a OF driver, and
makes dma_device point to a struct device embedded in a struct
platform_device.
This will make the system crash when rds_rdma is loaded in a system
with ehca, since it will try to access the bus member of a non-existent
struct pci_dev.
The only reason rds_rdma uses the struct pci_dev is to get the NUMA node
the device is attached to. Using dev_to_node for that is much better,
since it won't assume which bus the infiniband is attached to.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: dledford@redhat.com
Cc: Jes.Sorensen@redhat.com
Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Cc: rds-devel@oss.oracle.com
---
net/rds/ib.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/rds/ib.h b/net/rds/ib.h
index edfaaaf..8d2b3d5 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -186,8 +186,7 @@ struct rds_ib_device {
struct work_struct free_work;
};
-#define pcidev_to_node(pcidev) pcibus_to_node(pcidev->bus)
-#define ibdev_to_node(ibdev) pcidev_to_node(to_pci_dev(ibdev->dma_device))
+#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device)
#define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
/* bits for i_ack_flags */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-01-13 21:21 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <ed54708d-990e-4c8f-8057-50a70f93d3d8@default>
2012-01-05 17:05 ` [PATCH] rds_rdma: don't assume infiniband device is PCI Thadeu Lima de Souza Cascardo
2012-01-05 18:57 ` David Miller
2012-01-06 15:57 ` Thadeu Lima de Souza Cascardo
2012-01-06 17:43 ` Thadeu Lima de Souza Cascardo
2012-01-06 19:27 Venkat Venkatsubra
-- strict thread matches above, loose matches on Subject: below --
2012-01-04 22:03 Thadeu Lima de Souza Cascardo
2012-01-06 17:47 ` Roland Dreier
2012-01-06 17:49 ` Roland Dreier
2012-01-13 18:17 ` Thadeu Lima de Souza Cascardo
2012-01-13 18:25 ` David Miller
2012-01-13 18:52 ` Thadeu Lima de Souza Cascardo
2012-01-13 21:12 ` David Miller
2012-01-13 21:21 ` Thadeu Lima de Souza Cascardo
2012-01-13 18:35 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).