Page MenuHomeFreeBSD

Retry_count in minidump 64 bit code delaying ENOSPC by around 30 minutes for live cores.
ClosedPublic

Authored by raviprakash.darbha_gmail.com on Oct 14 2016, 10:15 PM.

Details

Summary

I notice that when, the system runs out of space and we are trying to get a live core dump there is delay of around 30 minutes to return ENOSPC to the upper layers. This is on AMD64. As I go through the code , I see a retry count in amd64 not present in other platforms in sys/amd64/amd64/minidump_machdep.c . Its compared against 5 ( Not sure where that number comes from ). Because of this, the live core generation in our platform is delayed and as the memory map keeps increasing( lots of other stuff running ) it makes things worse. I want to make this retry count a tunable so that it can be changed at runtime accordingly.

Test Plan

I have verified this behavior on our platform and works as intended.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

raviprakash.darbha_gmail.com retitled this revision from to Retry_count in minidump 64 bit code delaying ENOSPC by around 30 minutes for live cores..
raviprakash.darbha_gmail.com updated this object.
raviprakash.darbha_gmail.com edited the test plan for this revision. (Show Details)
raviprakash.darbha_gmail.com set the repository for this revision to rS FreeBSD src repository.
cem added a subscriber: cem.Oct 14 2016, 11:14 PM

Please upload a diff with full context. (Either use diff -U9999 or arc.)

sys/amd64/amd64/minidump_machdep.c
77–78 ↗(On Diff #21404)

This can just be SYSCTL_INT(..., CTLFLAG_RWTUN, ...).

added the full file for more context. Also merged TUNABLE and SYSCTL_INT into one command.

cem accepted this revision.Oct 16 2016, 12:57 AM
cem added a reviewer: cem.
This revision is now accepted and ready to land.Oct 16 2016, 12:57 AM
markj accepted this revision.Oct 16 2016, 1:43 AM
markj added a reviewer: markj.
markj added a subscriber: markj.

LGTM with those nits fixed.

sys/amd64/amd64/minidump_machdep.c
35 ↗(On Diff #21424)

This should be sorted between msgbuf.h and watchdog.h.

72 ↗(On Diff #21424)

dump_retry_count seems like a better name to me.

raviprakash.darbha_gmail.com edited edge metadata.

Addressed comments by markj

This revision now requires review to proceed.Oct 16 2016, 2:05 AM
cem accepted this revision.Oct 16 2016, 2:16 AM
cem edited edge metadata.
This revision is now accepted and ready to land.Oct 16 2016, 2:16 AM
This revision was automatically updated to reflect the committed changes.