Page MenuHomeFreeBSD

Don't allow malloc() to wait for resource while holding a lock in ITS
ClosedPublic

Authored by zbb on Jul 17 2015, 6:38 PM.
Tags
None
Referenced Files
F82180934: D3121.diff
Fri, Apr 26, 6:07 AM
Unknown Object (File)
Jan 19 2024, 8:04 AM
Unknown Object (File)
Dec 21 2023, 8:17 AM
Unknown Object (File)
Nov 13 2023, 11:37 AM
Unknown Object (File)
Nov 9 2023, 10:34 PM
Unknown Object (File)
Oct 25 2023, 5:53 AM
Unknown Object (File)
Oct 8 2023, 9:27 PM
Unknown Object (File)
Sep 24 2023, 4:41 PM

Details

Summary

malloc() should not go to sleep in case of lack of resource while
the kernel thread is holding a non-sleepable lock.

  • change malloc() flags to M_NOWAIT in such cases
  • implement lpi_free_chunk() routine since it will be needed when ITT allocation fails in its_device_alloc_locked()
  • do not increase verbosity of this code since upper layers will communicate an error if the interrupt setup fails

Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zbb retitled this revision from to Don't allow malloc() to wait for resource while holding a lock in ITS.
zbb updated this object.
zbb edited the test plan for this revision. (Show Details)
zbb set the repository for this revision to rS FreeBSD src repository - subversion.
zbb added a subscriber: freebsd-arm-list.
wma_semihalf.com edited edge metadata.

Just tested on two ThunderX revisions (CRB and EVB) and works great. Please commit.

This revision is now accepted and ready to land.Jul 21 2015, 9:54 AM
This revision was automatically updated to reflect the committed changes.