Skip to content

Wip posix lru#66413

Open
mattbenjamin wants to merge 3 commits intoceph:mainfrom
linuxbox2:wip-posix-lru
Open

Wip posix lru#66413
mattbenjamin wants to merge 3 commits intoceph:mainfrom
linuxbox2:wip-posix-lru

Conversation

@mattbenjamin
Copy link
Contributor

@mattbenjamin mattbenjamin commented Nov 25, 2025

cohort_lru: crash fix and reduce lock contention

Fixes crash induced by taking the address of the last element
of an empty intrusive list (!).

Also, introduces active queue, reducing potential for lock
contention in evict_block():

* entries are tracked on lane::active_queue when lru_refcnt > 1
** on some lane::q otherwise

Object transition between queues when lru_refcnt changes value--
a value of 0 triggers deletion, as before.

Fixes: https://tracker.ceph.com/issues/73992

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@mattbenjamin
Copy link
Contributor Author

I think this contains the fix for evict crashes on older versions

@mattbenjamin
Copy link
Contributor Author

will add a tracker for that and update the commit msg

Copy link
Contributor

@dang dang left a comment

Choose a reason for hiding this comment

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

Looks good, but the "Bucket cache entry cleanup in progress" commit does nothing and is later reverted, so it should probably be removed.

@ivancich
Copy link
Member

@mattbenjamin : is this ready for the needs-qa label?

@ivancich ivancich added the In Progress PR in progress and not yet ready for review. label Feb 5, 2026
Fixes crash induced by taking the address of the last element
of an empty intrusive list (!).

Also, introduces active queue, reducing potential for lock
contention in evict_block():

* entries are tracked on lane::active_queue when lru_refcnt > 1
** on some lane::q otherwise

Object transition between queues when lru_refcnt changes value--
a value of 0 triggers deletion, as before.

Fixes: https://tracker.ceph.com/issues/73992

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
@mattbenjamin
Copy link
Contributor Author

this has now passed a teuthology run: https://pulpito.ceph.com/mbenjamin-2026-02-25_21:45:37-rgw-wip-posix-lru-distro-default-trial/
of course it has make check failures

@mattbenjamin
Copy link
Contributor Author

jenkins test make check

@mattbenjamin
Copy link
Contributor Author

jenkins test make check arm64

@mattbenjamin
Copy link
Contributor Author

mattbenjamin commented Feb 26, 2026

@dang missed your comment before about the 'in progress' commit; most of that should be removed, yes; will clean up and merge into the following commit

* avoids leak of database handles during eviction

Also adds missing return-ref in invalidate_entry--this would
leak a cache entry.

With this change, we can now tolerate indefinite s3-test runs
wit rgw_posix_cache_max_buckets=100.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix common In Progress PR in progress and not yet ready for review. rgw tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants