Re: reiser4[StorageManager(2383)]: lzo1_alloc...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Please, try the attached patches.
The first patch improves responsiveness to vm subsystem
(modified version of ->migratepage() from Ivan Shapovalov).
The second patch performs memory allocation in the critical
place with __GFP_NOFAIL flag.
Let us know about results.

Thanks,
Edward.

On 08/20/2017 07:15 PM, Metztli Information Technology wrote:
Niltze, Ed-

Although I am using your latest Reiser4 patch for Linux kernel 4.12.x on a test 1.2TB (transparent compression) reiser4 root fs, I have seen
dmesg generate the following in lesser version patches and in much smaller partitions, i.e., 20Gb -- with transparent compression, too.

Your input would be greatly appreciated:

[ 3449.944653] reiser4[StorageManager(2383)]: lzo1_alloc (/mnt/chiucuetetl/usr/src/linux/fs/reiser4/plugin/compress/compress.c:241)[edward-878]:
                WARNING: alloc workspace for lzo1 (tfm action = 1) failed

[ 3449.944674] reiser4[StorageManager(2383)]: lzo1_alloc (/mnt/chiucuetetl/usr/src/linux/fs/reiser4/plugin/compress/compress.c:241)[edward-878]:
                WARNING: alloc workspace for lzo1 (tfm action = 1) failed

[ 3449.944694] reiser4[StorageManager(2383)]: lzo1_alloc (/mnt/chiucuetetl/usr/src/linux/fs/reiser4/plugin/compress/compress.c:241)[edward-878]:
                WARNING: alloc workspace for lzo1 (tfm action = 1) failed

[ 3449.944715] reiser4[StorageManager(2383)]: lzo1_alloc (/mnt/chiucuetetl/usr/src/linux/fs/reiser4/plugin/compress/compress.c:241)[edward-878]:
                WARNING: alloc workspace for lzo1 (tfm action = 1) failed

[snip]
( the above replicate for about two(2) thousand lines )

Please note that the error above is not immediate but is triggered possibly by multiple events run simultaneously, i.e.,
  plugged 1TB USB hard disk with multiple partitions where copy operation to local disk is being run; another copy operation to-from local hard
disk itself on same filesystem; installing additional packages, building local software, etc.

Subsequently system slows down in latency and fan use increases in all instances.

Thank you in advance for your insight.


Best Professional Regards.
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message tomajordomo@xxxxxxxxxxxxxxx
More majordomo info athttp://vger.kernel.org/majordomo-info.html

diff --git a/as_ops.c b/as_ops.c
index 393e9d1..df856df 100644
--- a/as_ops.c
+++ b/as_ops.c
@@ -309,9 +309,45 @@ int reiser4_releasepage(struct page *page, gfp_t gfp UNUSED_ARG)
 int reiser4_migratepage(struct address_space *mapping, struct page *newpage,
 			struct page *page, enum migrate_mode mode)
 {
-	/* TODO: implement movable mapping
+	int result;
+	jnode *node;
+
+	assert("intelfx-62", PageLocked(page));
+	assert("intelfx-63", !PageWriteback(page));
+	assert("intelfx-64", reiser4_schedulable());
+	assert("intelfx-65", page->mapping != NULL);
+	assert("intelfx-66", page->mapping->host != NULL);
+
+	if (!PagePrivate(page))
+		/*
+		 * anonymous, not yet captured page
+		 */
+		return migrate_page(mapping, newpage, page, mode);
+	/*
+	 * page has an attached jnode. That jnode should be
+	 * linked with the new page. Otherwise, everyone
+	 * calling jnode_page(), etc will get invalid data
 	 */
-	return -EIO;
+	node = jnode_by_page(page);
+	spin_lock_jnode(node);
+	spin_lock(&(node->load));
+
+	page_clear_jnode(page, node);
+	set_page_private(newpage, 0ul);
+
+	result = migrate_page(mapping, newpage, page, mode);
+	if (unlikely(result))
+		/*
+		 * migration failed - reattach the old page
+		 */
+		jnode_attach_page(node, page);
+	else
+		jnode_attach_page(node, newpage);
+	spin_unlock(&(node->load));
+	spin_unlock_jnode(node);
+
+	assert("intelfx-67", reiser4_schedulable());
+	return result;
 }
 #endif /* CONFIG_MIGRATION */
 


diff --git a/plugin/item/ctail.c b/plugin/item/ctail.c
index 3f46c38..42a3134 100644
--- a/plugin/item/ctail.c
+++ b/plugin/item/ctail.c
@@ -1565,6 +1565,7 @@ static int assign_conversion_mode(flush_pos_t * pos, ctail_convert_mode_t *mode)
 	if (!convert_data_attached(pos)) {
 		if (should_attach_convert_idata(pos)) {
 			struct inode *inode;
+			gfp_t old_mask = get_current_context()->gfp_mask;
 
 			assert("edward-264", pos->child != NULL);
 			assert("edward-265", jnode_page(pos->child) != NULL);
@@ -1577,7 +1578,9 @@ static int assign_conversion_mode(flush_pos_t * pos, ctail_convert_mode_t *mode)
 			/*
 			 * attach new convert item info
 			 */
+			get_current_context()->gfp_mask |= __GFP_NOFAIL;
 			ret = attach_convert_idata(pos, inode);
+			get_current_context()->gfp_mask = old_mask;
 			pos->child = NULL;
 			if (ret == -E_REPEAT) {
 				/*



[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux