[RESEND,0/4] minor cleanups for compact lock functions in

Message ID 20230725180456.2146626-1-shikemeng@huaweicloud.com
Headers
Series minor cleanups for compact lock functions in |

Message

Kemeng Shi July 25, 2023, 6:04 p.m. UTC
  Hi all, this series tries to remove repeact lock handle code in
compaction. Patch 1-3 try to make compact_unlock_should_abort
more common and can be used in both isolate_freepages_block and
isolate_migratepages_block. Patch 4 adds a new compact lock function
compact_unlock_irqrestore used along with existing compact_lock_irqsave
to remove repeat code to do compact unlock.
More details can be found in respective patches. Thanks!

Kemeng Shi (4):
  mm/compaction: use "spinlock_t *" to record held lock in compact
    [un]lock functions
  mm/compaction: use "spinlock_t *" to record held lock in
    isolate_migratepages_block
  mm/compaction: use compact_unlock_should_abort in
    isolate_migratepages_block
  mm/compaction: add compact_unlock_irqrestore to remove repeat code

 mm/compaction.c | 85 ++++++++++++++++++-------------------------------
 1 file changed, 31 insertions(+), 54 deletions(-)