Re: mprotect() api overhead.

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Fri Apr 05 2002 - 23:13:59 EST


> From: <Tony.P.Lee@nokia.com>
> Date: Fri, 22 Mar 2002 22:10:20 PST

> We like to design a software in certain module way. For example,
> a libForwardTableManager.so for infiniband switch manager
> might manager 128 MBytes of share memory data. 10 or more
> applications will call the APIs in the libForwardTableManager.so
> to get/set the forward table data.
>[...]
> What I like to do is to use the mprotect() api to turn on/off the
> memory read/write access to the globally share memory. This
> way, the only possible memory corruption to the share table
> is from the APIs in the libForwardTableManager.so

Tony, I think you need to rethink your API.
E.g. what does the switch manager do and why did you
decide to keep any data in a shared memory, of all things?
Why do you need several applications to access the
switch forwarding table? Perhaps, if you answer those
questions, you do not need to bang mprotect() so hard
anymore.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 07 2002 - 22:00:19 EST