9#ifndef _LINUX_FOLIO_BATCH_H
10#define _LINUX_FOLIO_BATCH_H
15#define FOLIO_BATCH_SIZE 31
41static inline void folio_batch_init(
struct folio_batch *fbatch)
48static inline void folio_batch_reinit(
struct folio_batch *fbatch)
54static inline unsigned int folio_batch_count(
const struct folio_batch *fbatch)
59static inline unsigned int folio_batch_space(
const struct folio_batch *fbatch)
74static inline unsigned folio_batch_add(
struct folio_batch *fbatch,
78 return folio_batch_space(fbatch);
91 if (fbatch->
i == fbatch->
nr)
93 return fbatch->
folios[fbatch->
i++];
98static inline void folio_batch_release(
struct folio_batch *fbatch)
100 if (folio_batch_count(fbatch))
#define NULL
Definition actypes.h:561
void __folio_batch_release(struct folio_batch *fbatch)
void folio_batch_remove_exceptionals(struct folio_batch *fbatch)
#define FOLIO_BATCH_SIZE
Definition folio_batch.h:15
Definition folio_batch.h:28
bool percpu_pvec_drained
Definition folio_batch.h:31
unsigned char i
Definition folio_batch.h:30
unsigned char nr
Definition folio_batch.h:29
struct folio * folios[FOLIO_BATCH_SIZE]
Definition folio_batch.h:32