From: Chris Gentile <cnjgentile@gmail.com>
To: Evgeniy <iron.udjin@gmail.com>
Cc: Mathieu Belanger <m@thieu.so>,
Edward Shishkin <edward.shishkin@gmail.com>,
reiserfs-devel@vger.kernel.org
Subject: Re: Reiser4 GIT and Kernel 3.11 patchs
Date: Wed, 18 Sep 2013 13:30:55 +0000 [thread overview]
Message-ID: <5239AB0F.6070600@gmail.com> (raw)
In-Reply-To: <CAL2jS+mJrpsgB5JoZcqBF30jfPiGPn4d8+VpoDr8tyQ1wo=THw@mail.gmail.com>
By the way I'm sure you've all heard of Google PerfTools.
There is a component in it called TcMalloc -- libtcmalloc.so.
If you put LD_PRELOAD="/usr/lib64/libtcmalloc.so /usr/lib64/libdl.so" in
your .bashrc or whatever startup files it seems to make all operations,
including file input/output faster. SImilar to the Hoard memory
allocator, but I think I trust Google development more.
Point being, works with Reiser 4 and adds no complexity or problems to
the mix.
Chris
On 09/18/13 13:20, Evgeniy wrote:
> Hello guys,
>
> FIrst of all, I'm not a programmer. Today I was playing a little bit
> with current version reiser4 for 3.11 kernel and it seems I fixed the
> the problem with compilation. I did't have posibility to test it yet.
> But at least it compilles fine. Here is patch for branch
> reiser4-for-3.11 (https://github.com/DestroyFX/reiser4).
>
> diff -Naur reiser4-3.11/fs/reiser4/fsdata.c linux-3.11.1/fs/reiser4/fsdata.c
> --- reiser4-3.11/fs/reiser4/fsdata.c 2013-09-18 14:31:22.065970590 +0300
> +++ linux-3.11.1/fs/reiser4/fsdata.c 2013-09-18 15:58:30.836601962 +0300
> @@ -16,7 +16,7 @@
> static unsigned long d_cursor_unused = 0;
>
> /* spinlock protecting manipulations with dir_cursor's hash table and lists */
> -DEFINE_SPINLOCK(d_lock);
> +DEFINE_SPINLOCK(d_lockref);
>
> static reiser4_file_fsdata *create_fsdata(struct file *file);
> static int file_is_stateless(struct file *file);
> @@ -36,7 +36,7 @@
> if (sc->nr_to_scan != 0) {
> dir_cursor *scan;
>
> - spin_lock(&d_lock);
> + spin_lock(&d_lockref);
> while (!list_empty(&cursor_cache)) {
> scan = list_entry(cursor_cache.next, dir_cursor, alist);
> assert("nikita-3567", scan->ref == 0);
> @@ -45,7 +45,7 @@
> if (sc->nr_to_scan == 0)
> break;
> }
> - spin_unlock(&d_lock);
> + spin_unlock(&d_lockref);
> }
> return d_cursor_unused;
> }
> @@ -277,13 +277,13 @@
> if (fsdata != NULL) {
> cursor = fsdata->cursor;
> if (cursor != NULL) {
> - spin_lock(&d_lock);
> + spin_lock(&d_lockref);
> --cursor->ref;
> if (cursor->ref == 0) {
> list_add_tail(&cursor->alist, &cursor_cache);
> ++d_cursor_unused;
> }
> - spin_unlock(&d_lock);
> + spin_unlock(&d_lockref);
> file->private_data = NULL;
> }
> }
> @@ -350,12 +350,12 @@
> file->private_data = fsdata;
> fsdata->cursor = cursor;
> spin_unlock_inode(inode);
> - spin_lock(&d_lock);
> + spin_lock(&d_lockref);
> /* insert cursor into hash table */
> d_cursor_hash_insert(&info->table, cursor);
> /* and chain it into radix-tree */
> bind_cursor(cursor, (unsigned long)oid);
> - spin_unlock(&d_lock);
> + spin_unlock(&d_lockref);
> radix_tree_preload_end();
> file->f_pos = ((__u64) cursor->key.cid) << CID_SHIFT;
> }
> @@ -398,7 +398,7 @@
> oid = get_inode_oid(inode);
> spin_lock_inode(inode);
> head = get_readdir_list(inode);
> - spin_lock(&d_lock);
> + spin_lock(&d_lockref);
> /* find any cursor for this oid: reference to it is hanging of radix
> * tree */
> start = lookup(info, (unsigned long)oid);
> @@ -433,7 +433,7 @@
> scan = next;
> } while (scan != start);
> }
> - spin_unlock(&d_lock);
> + spin_unlock(&d_lockref);
> /* check that we killed 'em all */
> assert("nikita-3568",
> ergo(act == CURSOR_KILL,
> @@ -548,7 +548,7 @@
>
> key.cid = pos >> CID_SHIFT;
> key.oid = get_inode_oid(inode);
> - spin_lock(&d_lock);
> + spin_lock(&d_lockref);
> cursor = d_cursor_hash_find(&d_info(inode)->table, &key);
> if (cursor != NULL) {
> /* cursor was found */
> @@ -559,7 +559,7 @@
> }
> ++cursor->ref;
> }
> - spin_unlock(&d_lock);
> + spin_unlock(&d_lockref);
> if (cursor != NULL) {
> spin_lock_inode(inode);
> assert("nikita-3556", cursor->fsdata->back == NULL);
> diff -Naur reiser4-3.11/fs/reiser4/fsdata.h linux-3.11.1/fs/reiser4/fsdata.h
> --- reiser4-3.11/fs/reiser4/fsdata.h 2013-09-18 14:31:22.065970590 +0300
> +++ linux-3.11.1/fs/reiser4/fsdata.h 2013-09-18 15:56:44.438932116 +0300
> @@ -189,7 +189,7 @@
> };
>
> /* spinlock protecting readdir cursors */
> -extern spinlock_t d_lock;
> +extern spinlock_t d_lockref;
>
> /* __REISER4_FSDATA_H__ */
> #endif
> diff -Naur reiser4-3.11/fs/reiser4/plugin/file/file.c
> linux-3.11.1/fs/reiser4/plugin/file/file.c
> --- reiser4-3.11/fs/reiser4/plugin/file/file.c 2013-09-18
> 14:31:22.071970515 +0300
> +++ linux-3.11.1/fs/reiser4/plugin/file/file.c 2013-09-18
> 16:00:04.635429315 +0300
> @@ -2318,7 +2318,7 @@
> uf_info = unix_file_inode_data(inode);
>
> get_exclusive_access_careful(uf_info, inode);
> - if (file->f_dentry->d_count == 1 &&
> + if (file->f_dentry->d_lockref.count == 1 &&
> uf_info->container == UF_CONTAINER_EXTENTS &&
> !should_have_notail(uf_info, inode->i_size) &&
> !rofs_inode(inode)) {
>
> On 18 September 2013 09:59, Chris Gentile <cnjgentile@gmail.com> wrote:
>> Don't know how to code :(
>>
>> I am in include/linux/dcache.h right now at the first line where the
>> error occurs... I wonder where I put one of the characters it suggests??
>> The line reads: (gives same error as you mentioned)
>>
>> #define d_lock d_lockref.lock
>>
>> I guess it needs some type of character before the period?? What do you
>> think?
>>
>>
>>
>>
>> On 09/18/13 06:54, Mathieu Belanger wrote:
>>> you can edit the code directly.
>>>
>>> Tell me if it compile after that.
>>> If it compile you can make a patch with git (git diff >
>>> /tmp/patch.patch) or you can clone, work on your clone, commit and do
>>> a pull request so I can add it.
>>>
>>> I can also add you as maintainer if you want to work directly on it.
>>>
>>>
>>>
>>> Also, I get that error with 3.11 and 3.12-rc1 but not with 3.11-rc4 :
>>>
>>> In file included from fs/reiser4/super.h:14:0,
>>> from fs/reiser4/debug.c:28:
>>> fs/reiser4/fsdata.h:192:19: error: expected '=', ',', ';', 'asm' or
>>> '__attribute__' before '.' token
>>>
>>>
>>>
>>> 3.11-rc4 compile fine.
next prev parent reply other threads:[~2013-09-18 13:30 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 18:15 Reiser4 GIT and Kernel 3.11 patchs Mathieu Belanger
2013-09-17 19:52 ` Edward Shishkin
2013-09-17 20:24 ` Evgeniy
2013-09-17 20:37 ` Chris Gentile
2013-09-17 21:02 ` Evgeniy
2013-09-17 21:15 ` Mathieu Belanger
2013-09-17 21:22 ` Chris Gentile
2013-09-17 22:02 ` Chris Gentile
2013-09-18 3:44 ` Mathieu Belanger
2013-09-18 5:52 ` Chris Gentile
2013-09-18 6:14 ` Chris Gentile
2013-09-18 6:20 ` Mathieu Belanger
2013-09-18 6:47 ` Chris Gentile
2013-09-18 6:54 ` Mathieu Belanger
2013-09-18 6:59 ` Chris Gentile
2013-09-18 13:20 ` Evgeniy
2013-09-18 13:27 ` Chris Gentile
2013-09-18 13:30 ` Chris Gentile [this message]
2013-09-18 14:02 ` Evgeniy
2013-09-18 15:53 ` Evgeniy
2013-09-18 16:09 ` Mathieu Belanger
2013-09-18 16:20 ` Mathieu Belanger
2013-09-18 16:24 ` Evgeniy
2013-09-18 16:39 ` Mathieu Belanger
2013-09-18 18:02 ` Evgeniy
2013-09-18 18:20 ` Mathieu Belanger
2013-09-18 18:36 ` Mathieu Belanger
2013-09-18 23:24 ` Mathieu Belanger
2013-09-18 23:36 ` Edward Shishkin
2013-09-19 1:25 ` Mathieu Belanger
[not found] ` <CADW=+3=znbq=KDqCmzQ_eq=V_9i4VpHj_uOcB3joJbZUZPNtdA@mail.gmail.com>
2013-09-19 5:45 ` Mathieu Belanger
2013-09-19 9:12 ` Edward Shishkin
2013-09-19 10:10 ` Evgeniy
2013-09-19 10:23 ` Evgeniy
2013-09-19 10:24 ` Edward Shishkin
2013-09-19 15:02 ` Christopher Gentile
2013-09-19 14:43 ` Christopher Gentile
[not found] ` <5238C666.6080703@gmail.com>
2013-09-17 21:22 ` Evgeniy
2013-09-17 21:25 ` Chris Gentile
2013-09-17 21:35 ` Evgeniy
[not found] ` <CAL2jS+mhmvmse7UqK4Xa0pYLSBJ9mfBDohKYFKdjzpAbL-=prA@mail.gmail.com>
2013-09-17 23:13 ` Edward Shishkin
-- strict thread matches above, loose matches on Subject: below --
2013-09-19 15:14 m
2013-09-19 15:55 ` Mathieu Belanger
2013-09-19 16:08 ` Christopher Gentile
2013-09-19 16:21 ` Christopher Gentile
2013-09-19 18:09 ` Mathieu Belanger
2013-09-19 20:05 ` Edward Shishkin
2013-09-19 18:16 ` Christopher Gentile
2013-09-23 19:01 ` Edward Shishkin
2013-09-23 21:21 ` Edward Shishkin
2013-09-24 9:08 ` Chris Gentile
2013-09-25 0:31 ` Mathieu Belanger
2013-09-25 0:34 ` Chris Gentile
2013-09-28 16:06 ` Chris Gentile
2013-09-25 4:47 ` Chris Gentile
2013-09-28 16:20 m
2013-09-28 17:43 ` Chris Gentile
[not found] ` <20130928174954.Horde.5eBFCXLtsWAtF9zNtt95nQ1@mail.thieu.so>
2013-09-28 18:22 ` Chris Gentile
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=5239AB0F.6070600@gmail.com \
--to=cnjgentile@gmail.com \
--cc=edward.shishkin@gmail.com \
--cc=iron.udjin@gmail.com \
--cc=m@thieu.so \
--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).