reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Reiserfs development mailing list <reiserfs-devel@vger.kernel.org>
Cc: Mathieu Belanger <admin@korinar.com>
Subject: Re: reiser4[StorageManager(2383)]: lzo1_alloc...
Date: Tue, 22 Aug 2017 21:49:21 +0300	[thread overview]
Message-ID: <599C7CB1.6080408@gmail.com> (raw)
In-Reply-To: <20170820171513.B783215FEAF@huitzilopochtli.metztli-it.com>

[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]

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@vger.kernel.org
> More majordomo info athttp://vger.kernel.org/majordomo-info.html


[-- Attachment #2: reiser4-migratepage.patch --]
[-- Type: text/x-patch, Size: 1459 bytes --]

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 */
 



[-- Attachment #3: reiser4-alloc-compression-workspace-with-nofail-flag.patch --]
[-- Type: text/x-patch, Size: 865 bytes --]

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) {
 				/*



  reply	other threads:[~2017-08-22 18:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20 17:15 reiser4[StorageManager(2383)]: lzo1_alloc Metztli Information Technology
2017-08-22 18:49 ` Edward Shishkin [this message]
2017-08-30  9:29   ` Edward Shishkin
  -- strict thread matches above, loose matches on Subject: below --
2017-08-24  4:59 Metztli Information Technology
2017-08-24 13:01 ` Edward Shishkin
2017-08-25  4:42 Metztli Information Technology
     [not found] ` <CAMDqdwxyR7nFy66chkkfVCRVHKA_PHoTosMrynXvvRRiDB-q7Q@mail.gmail.com>
2017-08-25 16:22   ` Edward Shishkin
2017-08-26  7:15 Metztli Information Technology
2017-08-28 13:15 ` Edward Shishkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=599C7CB1.6080408@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=admin@korinar.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).