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
Unknown Object (File)
Thu, Jan 23, 2:21 PM
Unknown Object (File)
Thu, Jan 23, 12:12 PM
Unknown Object (File)
Thu, Jan 9, 12:35 AM
Unknown Object (File)
Dec 20 2024, 8:48 PM
Unknown Object (File)
Dec 13 2024, 5:32 PM
Unknown Object (File)
Nov 15 2024, 8:35 AM
Unknown Object (File)
Nov 13 2024, 1:06 AM
Unknown Object (File)
Nov 13 2024, 12:53 AM

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.