[PATCH v2] vhost: exclude VM hugepages from coredumps

Stephen Hemminger stephen at networkplumber.org
Fri Feb 3 18:45:45 CET 2023


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.


More information about the dev mailing list