We are now out of aflags bits, whereas the "flags" field only makes use
of five of its sixteen bits. I have no intention of adding a new aflag
in the near future, but would like to combine the aflags, queue and
act_count fields into a single atomically updated word. This will allow
vm_page_pqstate_cmpset() to become much simpler and is a step towards
eliminating the use of the page lock array in updating per-page queue
state.
Details
Details
- Reviewers
alc kib dougm jeff - Commits
- rS354820: Widen the vm_page aflags field to 16 bits.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/vm/vm_page.h | ||
|---|---|---|
| 239 ↗ | (On Diff #64413) | Change the type to uint8_t since you are moving the line ? |
| sys/vm/vm_page.h | ||
|---|---|---|
| 438 ↗ | (On Diff #64413) | I think that would be fine since I am changing the layout of struct vm_page anyway. |
| 719 ↗ | (On Diff #64413) | I think so, but in the next patch I will actually add a typedef struct vm_page_astate {
uint16_t flags;
uint8_t queue;
uint8_t act_count;
} vm_page_astate_t;and pass that around instead, so I do not think there is much value in adding a typedef specifically for the flags. |