[sle-beta] Heads up if you use openafs at all

Mel Gorman mgorman at suse.com
Wed Nov 8 02:21:22 MST 2017

On Wed, Nov 08, 2017 at 02:05:58AM +0000, Mike Marion wrote:
> ...or anything else that has a kernel module and calls
> page_cache_alloc_cold
> I tried, in vain, to build openafs on Beta1.. it turns out Suse has
> patched out the page_cache_alloc_cold function from the kernel.  See
> patch file suse/patches.suse/mm-remove-__GFP_COLD.patch (or link
> http://lkml.kernel.org/r/20171018075952.10627-9-mgorman@techsingularity.net)
> The reasoning and such makes sense, but it's not in mainline yet so
> anything out there with kernel modules that you're used to building that
> requires this, isn't going to build.

Hi Mike,

Ultimately, we expect drivers using the function to convert as the
patches in question are expected to be included in 4.15. There are
numerous potential workarounds. One could add a simple

#define page_cache_alloc_cold(x) page_cache_alloc(x)

to one of the headers of the affected out-of-tree module until it can
detect the presense of the API. Another is to apply the patch below to the
local kernel headers. It'll trigger a deprecated warning encourging driver
authors to convert. If this is a persistent problem, I can merge the patch
to SLE-15 which we can carry for at least one release. I hope this helps

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 18b022823b47..7130c4213e05 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -214,6 +214,12 @@ static inline struct page *page_cache_alloc(struct address_space *x)
 	return __page_cache_alloc(mapping_gfp_mask(x));
+static inline __deprecated
+struct page *page_cache_alloc_cold(struct address_space *x)
+	return page_cache_alloc(x);
 static inline gfp_t readahead_gfp_mask(struct address_space *x)
 	return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN;

Mel Gorman

More information about the sle-beta mailing list