Bug 6881 - mm/page_alloc: don't corrupt pcppage_migratetype
Summary: mm/page_alloc: don't corrupt pcppage_migratetype
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: mm (show other bugs) mm
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: wangrongwei
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-17 15:56 UTC by jiangxin00
Modified: 2023-10-17 19:49 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jiangxin00 hygon_group 2023-10-17 15:56:56 UTC
Description of problem:

    When placing pages on a pcp list, migratetype values over
    MIGRATE_PCPTYPES get added to the MIGRATE_MOVABLE pcp list.

    However, the actual migratetype is preserved in the page and should
    not be changed to MIGRATE_MOVABLE or the page may end up on the wrong
    free_list.

    The impact is that HIGHATOMIC or CMA pages getting bulk freed from the
    PCP lists could potentially end up on the wrong buddy list.  There are
    various consequences but minimally NR_FREE_CMA_PAGES accounting could
    get screwed up.

    [mgorman@techsingularity.net: changelog update]

    Link: https://lkml.kernel.org/r/20210811182917.2607994-1-opendmb@gmail.com
    Fixes: df1acc856923 ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock")
    Signed-off-by: Doug Berger <opendmb@gmail.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 小龙 admin 2023-10-17 19:49:08 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2296