nanogui: How can i speed up client/server?


Previous by date: 30 Apr 2001 14:39:52 -0000 Re:Re: a question about flnx on framebuffer, Jordan Crouse
Next by date: 30 Apr 2001 14:39:52 -0000 Re: is multithread program supported by flnx of nano-X?, Jordan Crouse
Previous in thread: 30 Apr 2001 14:39:52 -0000 How can i speed up client/server?, linuxhh
Next in thread: 30 Apr 2001 14:39:52 -0000 Re: How can i speed up client/server?, Morten Rolland

Subject: Re: How can i speed up client/server?
From: Jordan Crouse ####@####.####
Date: 30 Apr 2001 14:39:52 -0000
Message-Id: <01043008391601.00902@cosmic>

On Saturday 28 April 2001 01:45, linuxhh mentioned:
> Hi, all
>
>
> When I view the source code of MW(nano-x), I found a function named
> "GrReqShmCmds" with some comments. It wrote:
>
> 	/*
> 	 * By Performing the 'GrOpen' without allocating a buffer, just
> 	 * shuffeling the struct over the wire, we can postpone the
> 	 * allocation of the client size command buffer, which will never be
> 	 * allocated if the first command after GrOpen() is
> 	 * GrReqShmCmds() which allocates a replacement shared memory
> 	 * segment.
> 	 * So: Calling GrReqShmCmds() right after GrOpen will prevent the
> 	 * traditional command queue buffer from being allocated from
> 	 * the process heap - and only the shared memory segment is
> 	 * allocated.
> 	 */
>
> It means GrReqShmCmds function can speed up client/server transfer. In some
> demos (ie. nxkbd, world ) also run this functions.

If you used shared memory, that is (which is an option in the config file).  
I normally don't use it, becuase not all flavors of LIBC are the same, and 
your memory map milage may vary.

> Now some questions puzzle me:
>
> 1. This function alloc a share memory for the client side. However, #if
> NONETWORK, function will do nothing and not declare prototype when #if
> !NONETWORK at server side. So I want to know the mechanism of share memory
> speed up in nano-X.

NONETWORK is defined when you are linking the server with the application, 
and so by definition you are getting shared memory (because they are the same 
process).  The shared memory routines you are looking at are in effect when 
the server and application are seperate processes.

> 2.I can't run any demos(such as nxkbd and world) that run this functions at
> my EDB7212 demo board. If I want to run this function, which options that I
> will select in my linux kernel? ( I think that share momory is offer by
> linux kernel to speed up socket transfer. Is it correct? Please help me. )

Change the SHARED_MEMORY line in your config file to 'Y', and good luck.
You probably won't need any special kernel support since this is userland 
memory, but your libc *will* need to support it.

Good luck,
Jordan

>
>
> Best regard.
>
>             linuxhh
>             ####@####.####
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 30 Apr 2001 14:39:52 -0000 Re:Re: a question about flnx on framebuffer, Jordan Crouse
Next by date: 30 Apr 2001 14:39:52 -0000 Re: is multithread program supported by flnx of nano-X?, Jordan Crouse
Previous in thread: 30 Apr 2001 14:39:52 -0000 How can i speed up client/server?, linuxhh
Next in thread: 30 Apr 2001 14:39:52 -0000 Re: How can i speed up client/server?, Morten Rolland


Powered by ezmlm-browse 0.20.