Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-13701: Memory bucket allocator API definition #13079

Closed
wants to merge 3 commits into from

Conversation

sherintg
Copy link
Collaborator

  • umem routines that allocates memory block will now take memory bucket id as and additional argument. umem internally now calls the extended dav allocator routines and memory bucket id is passed embedded in flags.
  • umem_get_mb_evictable() and dav_get_zone_evictable() are added to support allocator returning preferred zone to be used as evictable memory bucket for current allocations. Right now these routines always return zero.
  • The dav heap runtime is cleaned up to make provision for memory bucket implementation.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate watchers.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

@sherintg sherintg requested a review from a team as a code owner September 21, 2023 19:13
@sherintg sherintg self-assigned this Sep 21, 2023
@github-actions
Copy link

Bug-tracker data:
Errors are component not formatted correctly,Ticket number suffix is not a number. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data
https://daosio.atlassian.net/browse/DAOS-13701:

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

- umem routines that allocates memory block will now take
  memory bucket id as and additional argument. umem internally
  now calls the extended dav allocator routines and memory
  bucket id is passed embedded in flags.
- umem_get_mb_evictable() and dav_get_zone_evictable() are
  added to support allocator returning preferred zone to be
  used as evictable memory bucket for current allocations. Right
  now these routines always return zero.
- The dav heap runtime is cleaned up to make provision for
  memory bucket implementation.

Signed-off-by: Sherin T George <[email protected]>
Addressed clang-format errors/warnings.

Signed-off-by: Sherin T George <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

src/common/btree_class.c Outdated Show resolved Hide resolved
src/common/dav/dav.h Outdated Show resolved Hide resolved
src/common/dav/dav.h Show resolved Hide resolved
src/common/dav/obj.h Show resolved Hide resolved
src/common/btree_class.c Outdated Show resolved Hide resolved
src/common/dav/dav.h Outdated Show resolved Hide resolved
src/common/dav/dav.h Show resolved Hide resolved
- New umem macros are exported to do the allocation within
  memory bucket. umem internally now calls the modified backend
  allocator routines with memory bucket id passed as argument.
- umem_get_mb_evictable() and dav_get_zone_evictable() are
  added to support allocator returning preferred zone to be
  used as evictable memory bucket for current allocations. Right
  now these routines always return zero.
- The dav heap runtime is cleaned up to make provision for
  memory bucket implementation.

Signed-off-by: Sherin T George <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/3/execution/node/358/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/3/execution/node/403/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.4 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/3/execution/node/359/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/3/execution/node/351/log

@daosbuild1
Copy link
Collaborator

Test stage Unit Test bdev with memcheck on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/3/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test bdev on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/3/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/3/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/3/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test with memcheck on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/3/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/4/execution/node/260/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/4/execution/node/296/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.4 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/4/execution/node/269/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13079/4/execution/node/264/log

@daosbuild1
Copy link
Collaborator

Test stage Unit Test with memcheck on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/4/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test bdev on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/4/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/4/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Unit Test bdev with memcheck on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/4/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13079/4/display/redirect

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

src/common/dav/tx.c Show resolved Hide resolved
src/common/dav/tx.c Show resolved Hide resolved
src/common/dav/heap.c Show resolved Hide resolved
src/common/dav/heap.c Show resolved Hide resolved
src/common/dav/tx.c Show resolved Hide resolved
src/common/dav/heap.c Show resolved Hide resolved
Comment on lines +58 to +62
* heap_get_zoneset - returns the reference to the zoneset given
* zone or zone set id.
*/
struct zone_set *
heap_get_zoneset(struct palloc_heap *heap, uint32_t zone_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please decide to use either zoneset, zone_set or zone set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have addressed this and have used zoneset everywhere. I am now required to move this PR to new branch. Pls review the rework in #13152

Comment on lines +898 to +902
if (UMOFF_IS_NULL(umoff)) {
print_message("umoff unexpectedly NULL\n");
rc = 1;
goto end;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use two different error-handling methods?
Above you used asserts e.g. assert_true(UMOFF_IS_NULL(off));.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have addressed this. I am now required to move this PR to new branch. Pls review the rework in #13152

@sherintg
Copy link
Collaborator Author

Closing this PR as this change is getting moved to feature branch.

@sherintg sherintg closed this Oct 11, 2023
@sherintg sherintg deleted the sherintg/DAOS-13701 branch August 21, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants