[OpenWrt-Devel] mempool support question for building software

Derek Werthmuller thewerthfam at gmail.com
Thu Jun 26 22:45:33 EDT 2014


I'll try heading down this road, thanks for the advice.  I believe that
mempool is not required.  And can be turned off.  My Impression is that
there is a significant speed boost using mempool.  This is my rather
uninformed assessment.  The application I'm working on building is clamd,
.98.1 works on the brck2708 platform but takes 10 minutes to allocate 300
MB ram to hold the signatures.     I'll have to talk with the clamav group
to get a true assessment on why startup takes so long.



On Wed, Jun 25, 2014 at 2:36 PM, Florian Fainelli <florian at openwrt.org>
wrote:

> 2014-06-25 4:54 GMT-07:00 Derek Werthmuller <thewerthfam at gmail.com>:
> > After some research I've determined the header files I'm looking for are
> > kernel header files.  They are part of the memory management /memory
> > allocation section.  The package I'm trying to build uses mempool.h for
> > faster memory allocation.
> > Any help or advice on how to get the kernel to export these header files?
>
> This is a poor portability decision to rely on a Linux header that is
> not even exported. If we had to export mempool.h, this would be yet
> another patch that we had to maintain in OpenWrt because nobody would
> be accepting that upstream.
>
> Please find a way to work with the upstream authors of your package so
> that:
>
> a) they use a custom memory allocator that does not rely on mempool.h
> to be available if the standard C library malloc() implemenation is
> not fast enough (there are standard ways to implement a custom memory
> allocator)
> b) they provide a configure script switch and compile time switch that
> allows turning off the mempool.h dependency entirely
>
> > Cheers
> >     Derek
> >
> >
> > On Fri, Jun 6, 2014 at 6:53 PM, Florian Fainelli <florian at openwrt.org>
> > wrote:
> >>
> >> 2014-06-06 15:35 GMT-07:00 Derek Werthmuller <thewerthfam at gmail.com>:
> >> > I'm trying to build a new version of clamav for the brcm2708 platform
> >> > and
> >> > have some questions about the new build dependencies for the latest
> >> > version
> >> > of clamav 98.3.  98.1 built OK and didn't use openssl.
> >> >
> >> > The configure portion of the build is asking about mempool support.
> >> > output snip
> >> > ....
> >> > checking for sysctlbyname... no
> >> > configure: ****** mempool support disabled (mmap not available or not
> >> > usable)
> >> > ..
> >> > mempool.h is found in the -I$(BUILD_DIR)/linux-3.10.36/mm  directory.
> >> > I've
> >> > included the directory path in the Target_cpplfags, like below.  Is
> this
> >> > the
> >> > right way to do this?
> >>
> >> This is not the right way to do this, you should not include Linux
> >> kernel headers directly that have not been voluntarily exported.
> >>
> >> The kernel exports some header files for use by user-programs from its
> >> include/uapi/ directory. Those kernel headers are staged by the
> >> toolchain build process in staging_dir/toolchain-*/usr/include/linux.
> >>
> >> mempool.h does not appear to be in the headers exported for uapi, so I
> >> am not sure this is referring to the same mempool.h header file, it
> >> could be either some external library, or some internal header that
> >> does not get properly included.
> >>
> >> > As the make file will obviously be out of date soon
> >> > as a new kernel version is used.
> >> >
> >> > TARGET_CPPFLAGS += \
> >> >         -I$(STAGING_DIR)/usr/include \
> >> >         -I$(STAGING_DIR)/usr/include/openssl \
> >> >         -I$(STAGING_DIR)/usr/include/crypto \
> >> >         -I$(STAGING_DIR)/usr/include/libxml2 \
> >> >         -I$(STAGING_DIR)/usr/lib \
> >> >         -I$(TOOLCHAIN_DIR)/include \
> >> >         -I$(BUILD_DIR)/linux-3.10.36/mm \
> >> >
> >> > Thanks for the advice in advance.
> >> >
> >> > Cheers
> >> >    Derek
> >> >
> >> > _______________________________________________
> >> > openwrt-devel mailing list
> >> > openwrt-devel at lists.openwrt.org
> >> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >> >
> >>
> >> --
> >> Florian
> >
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
>
> --
> Florian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140626/8e760775/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list