[PATCH v2] vhost: exclude VM hugepages from coredumps

Mike Pattrick mkp at redhat.com
Mon Feb 6 02:13:36 CET 2023


On Fri, Feb 3, 2023 at 12:45 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> On Tue,  6 Dec 2022 10:05:09 -0500
> Mike Pattrick <mkp at redhat.com> wrote:
>
> > +
> > +static __rte_always_inline void
> > +mem_set_dump(__rte_unused void *ptr, __rte_unused size_t size, __rte_unused bool enable)
> > +{
> > +#ifdef MADV_DONTDUMP
> > +     if (madvise(ptr, size, enable ? MADV_DODUMP : MADV_DONTDUMP) == -1) {
> > +             rte_log(RTE_LOG_INFO, vhost_config_log_level,
> > +                     "VHOST_CONFIG: could not set coredump preference (%s).\n", strerror(errno));
> > +     }
> > +#endif
> > +}
>
> Why is this inlined in vhost.h? Hardly a critical path function.
>

Hello Steven,

I thought it was appropriate here due to the size and contents of that function.


Thanks,
M



More information about the dev mailing list