[rds-devel] FW: RDS -- how to detect peer is gone ?

Andy Grover andy.grover at oracle.com
Wed Mar 31 11:33:00 PDT 2010


Tang, Changqing wrote:
> Andy, Thank you for your confirmation, when do you have a fix for
> this 32bit RDS problem on x86_64 system ?
> 
> --CQ

Running 32 bit apps on 64bit kernel is not supported.

-- Andy

> 
> -----Original Message-----
> From: Andy Grover [mailto:andy.grover at oracle.com]
> Sent: Tuesday, March 30, 2010 8:00 PM
> To: Tang, Changqing
> Cc: RDS Devel
> Subject: Re: [rds-devel] FW: RDS -- how to detect peer is gone ?
> 
> Tang, Changqing wrote:
>> Andy, I looked 'man cmsg', 'struct rds_get_mr_args' is always 32
>> bytes.  Here is my test code:
>>
>> #include <stdio.h> #include <stdlib.h> #include <sys/socket.h>
>>
>> int main ()
>>
>> { struct cmsghdr *cmsg; char    cmsgbuf[CMSG_SPACE(32)];  /* using
>> struct rds_get_mr_args size */
>>
>> cmsg = (struct cmsghdr *)cmsgbuf;
>>
>> cmsg->cmsg_len = CMSG_SPACE(32); cmsg->cmsg_type = 0;
>> cmsg->cmsg_level = 1;
>>
>> fprintf(stderr, "offset %d\n", (char*)CMSG_DATA(cmsg)-(char*)cmsg); }
>>
>>
>> The offset for 64bit is 16 and for 32bit is 12.
>>
>> So if my code is 32bit, I put 'struct rds_get_mr_args' on 12 bytes
>> offset, but RDS kernel code will get it from 16 bytes offset.
>>
>> Am I wrong ?  Thank you again.
> 
> Hi CQ,
> 
> First, please always CC rds-devel so this discussion may be archived,
> and maybe help someone else in the future.
> 
> Regarding your question -- I think you're correct that 32bit userland
> will not work with 64bit kernel.
> 
> Regards -- Andy
> 
>> --CQ
>>
>>
>>
>> -----Original Message----- From: Andy Grover
>> [mailto:andy.grover at oracle.com] Sent: Tuesday, March 30, 2010 1:41 PM
>>  To: Tang, Changqing; RDS Devel Subject: Re: [rds-devel] FW: RDS --
>> how to detect peer is gone ?
>>
>> Tang, Changqing wrote:
>>> Andy, One simple question, does 32bit rds-rdma code work on x86_64
>>> machine ? I noticed that the size of 'struct cmsghdr' is different
>>> between 32bit and 64bit, If the kernel code is always 64bit, how
>>> does the RDS kernel code figure out The control message buffer is
>>> passed as 32bit format?
>>>
>>> Do I miss something here ?
>> See "man cmsg", it describes the various macros that resolve 32/64
>> differences.
>>
>> Regards -- Andy
>>
>>> Thank you. --CQ
>>>
>>> -----Original Message----- From: Andy Grover
>>> [mailto:andy.grover at oracle.com] Sent: Tuesday, March 16, 2010 5:44
>>> PM To: Tang, Changqing Cc: rds-devel at oss.oracle.com Subject: Re:
>>> [rds-devel] FW: RDS -- how to detect peer is gone ?
>>>
>>> Tang, Changqing wrote:
>>>>> [CQ] yes, the node is up and the process may corrupted. If you
>>>>> can extend the rds ping message a little bit to process as
>>>>> optional, that would be wonderful.
>>>> I don't see why rds's ping functionality as-is is insufficient
>>>> for what you want to do.
>>>>
>>>> [CQ] What do you mean ? how can I use rds ping function as-is to
>>>> identify process down ?
>>> Like I said, if the process doesn't respond but the rds ping does,
>>> then you know the machine is alive but the process is not.
>>>
>>> -- Andy
> 




More information about the rds-devel mailing list