[OpenAFS] Re: [OpenAFS-devel] exposing RPC code<->name mappings via rxgen extension, a library, and a new utility

Felix Frank Felix.Frank@Desy.de
Fri, 8 May 2009 13:53:49 +0200 (CEST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--579669762-580698042-1241783630=:15029
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Wed, 6 May 2009, Jeffrey Hutzelman wrote:

> --On Wednesday, May 06, 2009 03:05:39 PM +0200 Felix Frank 
> <Felix.Frank@Desy.de> wrote:
>
>> A proof of concept implementation is already running in DESY's
>> OpenAFS+OSD test cell.
>
> I'm confused.  I thought we were talking about supporting debugging tools 
> like translate_rpc and perhaps rxdebug.  What exactly do you have "running" 
> in your cell?

In RxOsd there are fs threads and fs statistic subcommands that produce 
friendly output detailing currently running RPCs and RPC statistics 
respectively. The effort to merge these advantages into OpenAFS proper was 
what made Steven come forward with this discussion in the first place 
(right?)

The debugging tool was to be more or less of a byproduct (again, did I get 
that right, Steven?)

The fact is that the opcode->name translation used to be hardcoded into fs.
The presented patch eliminates the need to do that. The enhanced fs (and osd)
command used in this cell rely on this patch already.

>>> So the consesus is to
>>> - generate very simple translation functions and
>
> If by "very simple" you mean that id->name translation works exactly like 
> ExecuteRequest, with a combination of switches for sparsely-populated space 
> and dispatch arrays for densly-populated space.  This is very important for 
> time- and space-efficiency, which is why rxgen constructs the ExecuteRequest 
> function the way it does.  Given that we _have_ this code and it is actually 
> _used_ in every service for dispatching RPC's, we know it is right and it 
> should be easily reusable.  That's why I've been suggesting modifying rxgen 
> to emit the new translation function (preferably as part of the libraries it 
> already generates), rather than writing something new from scratch.

I see - I didn't realize what the different ER routine generators were all
about. I've mingled code for generating translational routines into them,
updated patch is attached.
This is quite ugly and obscure, but I'd like to learn if this is in the
right spirit. Any suggestions for better function namings and code structure
are appreciated.

Otherwise (if there are no further fundamental objections) I will clean it
up on my own some time next week.

> And of course, if by "very simple" you also mean that name->id translation 
> does not exist in this form at all, since the only thing I can imagine 
> needing it is a tool like translate_rpc, which will use the tables.

True. This saves us from more trouble.

One question: I'm generating opcodenames<x>[] arrays in parallel to 
StubProcsArray<x>[]. Would it be valid to just use <pkg>_function_names[] 
instead?

Cheers
  - Felix
--579669762-580698042-1241783630=:15029
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=translate_rpc_full.patch
Content-Transfer-Encoding: BASE64
Content-Description: 
Content-Disposition: attachment; filename=translate_rpc_full.patch

SW5kZXg6IHNyYy9yeGdlbi9ycGNfcGFyc2UuYw0KPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQ0KLS0tIHNyYy9yeGdlbi9ycGNfcGFyc2UuYwkocmV2aXNpb24g
NjQ2KQ0KKysrIHNyYy9yeGdlbi9ycGNfcGFyc2UuYwkocmV2aXNpb24gNjUz
KQ0KQEAgLTkyNCw3ICs5MjQsNyBAQA0KIAlpZiAoU2ZsYWcgfHwgY2ZsYWcp
DQogCSAgICBzc19Qcm9jX0NvZGVHZW5lcmF0aW9uKGRlZnApOw0KICAgICB9
DQotICAgIGlmIChTZmxhZykNCisgICAgaWYgKFNmbGFnIHx8IChjZmxhZyAm
JiB4ZmxhZyAmJiAhcHJvY19zcGxpdF9mbGFnKSkNCiAJU1RPUkVWQUwoJnBy
b2NfZGVmaW5lZFtQYWNrYWdlSW5kZXhdLCBkZWZwKTsNCiB9DQogDQpAQCAt
MjAxOSw2ICsyMDE5LDkgQEANCiAgICAgbGlzdCAqbGlzdHA7DQogICAgIGRl
ZmluaXRpb24gKmRlZnA7DQogDQorICAgIGlmICggIVNmbGFnICkNCisJcmV0
dXJuOw0KKw0KICAgICBmX3ByaW50KGZvdXQsICJcbiIpOw0KICAgICBmb3Ig
KGxpc3RwID0gcHJvY19kZWZpbmVkW1BhY2thZ2VJbmRleF07IGxpc3RwICE9
IE5VTEw7DQogCSBsaXN0cCA9IGxpc3RwLT5uZXh0KSB7DQ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