npages is used in two optional cases:
- to conditionally create a separate DMA32 free list
- to index vm_page_array for VM_PHYSSEG_SPARSE
Add in more #ifdef's around npages statements.
Differential D34887
vm_phys_init: Quiet unused but set warnings about npages. jhb on Apr 12 2022, 6:31 PM. Authored by Tags None Referenced Files
Subscribers
Details npages is used in two optional cases:
Add in more #ifdef's around npages statements.
Diff Detail
Event TimelineComment Actions I really dislike all the ifdefs and would be tempted to define VM_DMA32_NPAGES_THRESHOLD to 0 if it's not defined. (And currently it's defined iff VM_FREELIST_DMA32 is defined anyway.) But this is ok. Comment Actions I would be fine with defaulting VM_DMA32_NPAGES_THRESHOLD to 0. I think npages declaration is still stuck with being under #ifdef's though as the read is only under #ifdef VM_FREELIST_DMA32 so you'd need all the new #ifdef's just with that name instead. (Right now I'm assuming that VM_DMA32_NPAGES_THRESHOLD basically implies VM_FREELIST_DMA32.)
Comment Actions Yeah, adding a default value for this threshold would just let us remove some of the existing ifdefs.
|