Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1595991
| Path | csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | zhouxianrong <zhouxianrong@huawei.com> |
| Newsgroups | linux.kernel |
| Subject | Re: + compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch added to -mm tree |
| Date | Thu, 09 Mar 2017 13:00:03 +0100 |
| Message-ID | <tj4TF-4Fc-41@gated-at.bofh.it> (permalink) |
| References | <tj1j4-2og-31@gated-at.bofh.it> <tj1j4-2og-29@gated-at.bofh.it> |
| X-Original-To | Vlastimil Babka <vbabka@suse.cz>, <akpm@linux-foundation.org>, <Mi.Sophia.Wang@huawei.com>, <hannes@cmpxchg.org>, <kirill.shutemov@linux.intel.com>, <mgorman@techsingularity.net>, <minchan@kernel.org>, <viro@zeniv.linux.org.uk>, <weidu.du@huawei.com>, <won.ho.park@huawei.com>, <zhangshiming5@huawei.com>, <zhouxiaoyan1@huawei.com>, <zhouxiyu@huawei.com>, <mm-commits@vger.kernel.org>, Jan Kara <jack@suse.cz>, Hugh Dickins <hughd@google.com>, Linux-FSDevel <linux-fsdevel@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="windows-1252"; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Originating-IP | [10.142.145.228] |
| X-Cfilter-Loop | Reflected |
| X-Mirapoint-Virus-Rapid-Raw | score=unknown(0), refid=str=0001.0A020206.58C14186.00D3,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 |
| X-Mirapoint-Loop-ID | d329bfb8b5738a26c15c521758757087 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 107 |
| Organization | linux.* mail to news gateway |
| X-Original-Date | Thu, 9 Mar 2017 19:50:14 +0800 |
| X-Original-Message-ID | <23e36637-8ca0-303c-108d-a06230d3d058@huawei.com> |
| X-Original-References | <58c099dc.qZs+2fQBHcULYdhi%akpm@linux-foundation.org> <6867e5fe-b67e-fe01-4cc4-8338b4043577@suse.cz> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1595991 |
Show key headers only | View raw
On 2017/3/9 15:58, Vlastimil Babka wrote: > On 03/09/2017 12:55 AM, akpm@linux-foundation.org wrote: >> >> The patch titled >> Subject: compaction: add def_blk_aops migrate function for memory compaction >> has been added to the -mm tree. Its filename is >> compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch >> >> This patch should soon appear at >> http://ozlabs.org/~akpm/mmots/broken-out/compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch >> and later at >> http://ozlabs.org/~akpm/mmotm/broken-out/compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch >> >> Before you just go and hit "reply", please: >> a) Consider who else should be cc'ed >> b) Prefer to cc a suitable mailing list as well >> c) Ideally: find the original patch on the mailing list and do a >> reply-to-all to that, adding suitable additional cc's >> >> *** Remember to use Documentation/SubmitChecklist when testing your code *** >> >> The -mm tree is included into linux-next and is updated >> there every 3-4 working days >> >> ------------------------------------------------------ >> From: zhouxianrong <zhouxianrong@huawei.com> >> Subject: compaction: add def_blk_aops migrate function for memory compaction > > That's not really a mm/compaction patch, but a block layer/migration patch. I > don't know internals of those so well, so I added some CC's. > >> The reason for doing this is based on two factors. >> >> 1. larg file read/write operations with order 0 can fragmentize >> memory rapidly. >> >> 2. when a special filesystem does not supply migratepage callback, >> kernel would fallback to default function fallback_migrate_page. >> but fallback_migrate_page could not migrate diry page nicely; >> specially kcompactd with MIGRATE_SYNC_LIGHT could not migrate >> diry pages due to this until clear_page_dirty_for_io in some >> procedure. i think it is not suitable here in this scenario. >> for dirty pages we should migrate it rather than skip or writeout >> it in kcomapctd with MIGRATE_SYNC_LIGHT. i think this problem is >> for all filesystem without migratepage not only for block device fs. >> >> So for compaction under large file writing supply migratepage for >> def_blk_aops. > > Is this really safe to do? buffer_migrate_page() has some assumptions listed in > its comment (and maybe more that are not listed). Do we know it's safe to use it > for all def_blk_aops users? I could not find out differences for different disks in block device filesystem; they should behave consistently in block device filesystem layer. for a page of file /dev/block/xxx, when we migrate it, i think it has no difference just like ext4 file migration. but i dare not to say yes. i hope more peoples give their suggestions. > >> Link: http://lkml.kernel.org/r/1488937915-78955-1-git-send-email-zhouxianrong@huawei.com >> Signed-off-by: zhouxianrong <zhouxianrong@huawei.com> >> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> >> Cc: Johannes Weiner <hannes@cmpxchg.org> >> Cc: Minchan Kim <minchan@kernel.org> >> Cc: Mel Gorman <mgorman@techsingularity.net> >> Cc: Vlastimil Babka <vbabka@suse.cz> >> Cc: Al Viro <viro@zeniv.linux.org.uk> >> Cc: <Mi.Sophia.Wang@huawei.com> >> Cc: <zhouxiyu@huawei.com> >> Cc: <weidu.du@huawei.com> >> Cc: <zhangshiming5@huawei.com> >> Cc: <won.ho.park@huawei.com> >> Cc: <zhouxiaoyan1@huawei.com> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> >> --- >> >> fs/block_dev.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff -puN fs/block_dev.c~compaction-add-def_blk_aops-migrate-function-for-memory-compaction fs/block_dev.c >> --- a/fs/block_dev.c~compaction-add-def_blk_aops-migrate-function-for-memory-compaction >> +++ a/fs/block_dev.c >> @@ -2064,6 +2064,9 @@ static const struct address_space_operat >> .releasepage = blkdev_releasepage, >> .direct_IO = blkdev_direct_IO, >> .is_dirty_writeback = buffer_check_dirty_writeback, >> +#ifdef CONFIG_MIGRATION >> + .migratepage = buffer_migrate_page, >> +#endif >> }; >> >> #define BLKDEV_FALLOC_FL_SUPPORTED \ >> _ >> >> Patches currently in -mm which might be from zhouxianrong@huawei.com are >> >> compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch >> > > > . >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: + compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch added to -mm tree Vlastimil Babka <vbabka@suse.cz> - 2017-03-09 09:10 +0100
Re: + compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch added to -mm tree zhouxianrong <zhouxianrong@huawei.com> - 2017-03-09 13:00 +0100
Re: + compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch added to -mm tree Jan Kara <jack@suse.cz> - 2017-03-09 13:20 +0100
Re: + compaction-add-def_blk_aops-migrate-function-for-memory-compaction.patch added to -mm tree Michal Hocko <mhocko@kernel.org> - 2017-03-09 14:40 +0100
csiph-web