reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Ivan Shapovalov <intelfx100@gmail.com>
Cc: "reiserfs-devel@vger.kernel.org" <reiserfs-devel@vger.kernel.org>
Subject: Re: [PATCHv6 3/5] reiser4: discard support: initial implementation using linked lists.
Date: Mon, 21 Jul 2014 00:49:14 +0200	[thread overview]
Message-ID: <53CC476A.4000704@gmail.com> (raw)
In-Reply-To: <53CC2EF1.8010705@gmail.com>


On 07/20/2014 11:04 PM, Edward Shishkin wrote:
>
> On 07/20/2014 02:33 PM, Edward Shishkin wrote:
>>
>> On 07/20/2014 12:06 PM, Ivan Shapovalov wrote:
>>>> 20 июля 2014 г., в 1:20, Edward Shishkin 
>>>> <edward.shishkin@gmail.com> написал(а):
>>>>
>>>>
>>>>> On 07/14/2014 03:56 AM, Edward Shishkin wrote:
>>>>>
>>>>>> On 07/13/2014 09:18 PM, Ivan Shapovalov wrote:
>>>> [...]
>>>>>> Nothing seems to call at least check_free_blocks(begin, end)...
>>>>>
>>>>> Oh, bad... I thought all this time that extents of the delete sets 
>>>>> are still dirty
>>>>> in the working bitmap at the moment of discard.
>>>>> Hmm, I definitely don't want to check the whole extents for 
>>>>> discard...
>>>>
>>>> False alarm, actually..
>>>>
>>>> Nothing is wrong if someone makes them dirty before issuing our 
>>>> discard
>>>> requests: his changes will be committed in the next sessions of 
>>>> possessing
>>>> the commit_mutex _after_ our discard. Everything is isolated.. For 
>>>> the same
>>>> reason we don't care if someone allocate blocks in head and tail 
>>>> paddings
>>>> before issuing our padded discard extents.
>>> I was just thinking about the very same possible race...
>>>
>>> But well, isn't the call to current_atom_complete_writes() placed 
>>> before acquisition of commit_mutex? I was under impression of that 
>>> relocate sets could be written while another atom is being committed 
>>> under the mutex.
>>
>> take the commit_mutex before flush if discard_enabled && 
>> should_check_heads.
>
>
> Actually, this is not so simple. E.g. I got a deadlock..
> Another option is to make head/tail paddings dirty with the
> following update of the extent of the delete_set.
> One more option is to not support such discard params.


Actually what we are trying to implement is "precise discard". This is
rather complicated task. I looked at other file systems: nobody bother
with paddings, just stupidly pass a freed extent to blkdev_issue_discard(),
which cuts the head and the tail. I suggest to do the same. We have done
our best. Someone can not afford even to accumulate the extents.

Edward.
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-07-20 22:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22 10:48 [PATCHv6 0/5] reiser4: discard support: initial implementation Ivan Shapovalov
2014-06-22 10:48 ` [PATCHv6 1/5] reiser4: make space_allocator's check_blocks() reusable Ivan Shapovalov
2014-06-22 10:48 ` [PATCHv6 2/5] reiser4: add an implementation of "block lists", splitted off the discard code Ivan Shapovalov
2014-06-22 10:48 ` [PATCHv6 3/5] reiser4: discard support: initial implementation using linked lists Ivan Shapovalov
2014-07-06 23:47   ` Edward Shishkin
2014-07-09 12:40     ` Ivan Shapovalov
2014-07-09 16:35       ` Edward Shishkin
2014-07-13  1:33       ` Edward Shishkin
2014-07-13 12:47         ` Ivan Shapovalov
2014-07-13 19:04           ` Edward Shishkin
2014-07-13 19:18             ` Ivan Shapovalov
2014-07-14  1:56               ` Edward Shishkin
2014-07-15 11:42                 ` Ivan Shapovalov
2014-07-16 10:23                   ` Edward Shishkin
2014-07-16 10:26                     ` Edward Shishkin
2014-07-16 11:24                     ` [veryRFC] [PATCH 0/2] reiser4: discard before dealloc: first approximation Ivan Shapovalov
2014-07-16 11:24                       ` [veryRFC] [PATCH 1/2] reiser4: discard support: perform discards and deallocations after writing logs Ivan Shapovalov
2014-07-16 11:24                       ` [veryRFC] [PATCH 2/2] reiser4: discard support: proof-of-concept for "discard before dealloc" Ivan Shapovalov
2014-07-20  1:11                         ` Edward Shishkin
2014-07-20 10:09                           ` Ivan Shapovalov
2014-07-16 14:19                       ` [veryRFC] [PATCH 0/2] reiser4: discard before dealloc: first approximation Ivan Shapovalov
2014-07-16 23:35                       ` Edward Shishkin
2014-07-17  9:46                         ` Ivan Shapovalov
2014-07-17 11:14                           ` Edward Shishkin
2014-07-20 11:33                             ` Ivan Shapovalov
2014-07-19 21:20                 ` [PATCHv6 3/5] reiser4: discard support: initial implementation using linked lists Edward Shishkin
2014-07-20 10:06                   ` Ivan Shapovalov
2014-07-20 12:33                     ` Edward Shishkin
2014-07-20 21:04                       ` Edward Shishkin
2014-07-20 22:49                         ` Edward Shishkin [this message]
2014-07-20 23:14                           ` Ivan Shapovalov
2014-07-22  8:57                             ` Edward Shishkin
2014-06-22 10:48 ` [PATCHv6 4/5] reiser4: blocknr_list: use kmem_cache instead of kmalloc for allocating entries Ivan Shapovalov
2014-06-22 10:48 ` [PATCHv6 5/5] reiser4: blocknr_set: " Ivan Shapovalov

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=53CC476A.4000704@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=intelfx100@gmail.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).