public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bruno Cesar Ribas <ribas@c3sl.ufpr.br>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Linus Torvalds <torvalds@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: New filesystem for Linux
Date: Sun, 5 Nov 2006 12:48:57 -0200	[thread overview]
Message-ID: <20061105144857.GA7305@c3sl.ufpr.br> (raw)
In-Reply-To: <Pine.LNX.4.64.0611050410210.29515@artax.karlin.mff.cuni.cz>

On Sun, Nov 05, 2006 at 05:14:06AM +0100, Mikulas Patocka wrote:
> On Sat, 4 Nov 2006, Linus Torvalds wrote:
> 
> >On Thu, 2 Nov 2006, Mikulas Patocka wrote:
> >>
> >>As my PhD thesis, I am designing and writing a filesystem, and it's now 
> >>in a
> >>state that it can be released. You can download it from
> >>http://artax.karlin.mff.cuni.cz/~mikulas/spadfs/
> >
> >Ok, not having actually tested any of this, I only have a few comments on
> >the source code:
> >
> >- the source tree layout is very confusing. Can you please separate the
> >  mkfs/fsck parts more clearly from the kernel driver parts?
> 
> Yes, fsck is already separated, mkfs could be too.
> 
> >- you have a _very_ confusing usage of upper-case. Not only are a lot of
> >  functions upper-case, some filenames are also upper-case. What would
> >  otherwise be more readable just ends up being hard to read because it's
> >  so odd and unexpected.
> >
> >  I'm sure there is some logic to it, but it escapes me.
> 
> I'm used to this. I usually make important functions with uppercase 
> letters and nonimportant temporary functions with lowercase letters.
> 
> But I see that it contradicts general kernel coding style, so I can change 
> it.
> 
> BTW do you find uppercase typedefs like
> typedef struct {
> 	...
> } SPADFNODE;
> confusing too?
> 
> Uppercase filenames are there because the files are taken from another 
> (not yet released) project. But the kernel driver does not share any code 
> except definitions of disk structures, I saw how badly an attempt to share 
> kernel code affected XFS.
> 
> >- your whitespace usage needs some work: please put empty lines between
> >  the declarations and the code in a function, and since you use a fair
> >  amount of "goto"s, please do NOT indent them into the code (it's almost
> >  impossible to pick out the target labels because you hide them with the
> >  code).
> >
> >- your whitespace, part 2: you have a fair number of one-liner
> >  if-statements, where again there is no indentation, and thus the flow
> >  is almost impossible to see. Don't wrote
> >
> >	if (somecomplexconditional) return;
> >
> >  but please instead write
> >
> >	if (somecomplexcondifional)
> >		return;
> >
> >  and perhaps use a few more empty lines to separate out the "paragraphs"
> >  of code (the same way you write email - nobody wants to see one solid
> >  block of code, you'd prefer to see "logical sections").
> >
> >  Here's a prime example of what NOT to do:
> >
> >	if (__likely(!(((*c)[1] - 1) & (*c)[1]))) (*c)[0] = key;
> >
> >  I dare anybody to be able to read that. That wasn't even the worst one:
> >  some of those if-statements were so long that you couldn't even _see_
> >  what the statement inside the if-statement even was (and I don't use a
> >  80-column wide terminal, this was in a 112-column xterm)
> 
> I see, that is fixable easily.
> 
> >- why use "__d_off" etc hard-to-read types? You seem to have typedef'ed
> >  it from sector_t, but you use a harder-to-read name than the original
> >  type was. Hmm?
> 
> I am used to __d_off from elsewhere. The same reason why I use 
> __likely/__unlikely instead of likely/unlikely.
> 
> __d_off may have some little meaning --- if someone wants to run 32-bit 
> spadfs filesystem on a kernel configuration with 64-bit sector_t. But I'm 
> not sure if someone would ever want it.
> 
> >- you have a few comments, but you could have a lot more explanation,
> >  especially since not all of your names are all that self-explanatory.
> >
> >Ok, with that out of the way, let's say what I _like_ about it:
> >
> >- it's fairly small
> >
> >- the code, while having the above problems, looks generally fairly
> >  clean. The whitespace issues get partially cleared by just running
> >  "Lindent" on it, although that's not perfect either (it still indents
> >  the goto target labels too much, although it at least makes them
> >  _visible_. But it won't add empty lines to delineate sections, of
> >  course, and it doesn't add comments ;^)
> >
> >- I like a lot of the notions, and damn, small and simple are both
> >  virtues on their own.
> >
> >So if you could make the code easier to read, and were to do some
> >benchmarking to show what it's good at and what the problems are, I think
> >you'd find people looking at it. It doesn't look horrible to me.
> 
> I placed some benchmark on 
> http://artax.karlin.mff.cuni.cz/~mikulas/spadfs/benchmarks/

Why don't you test with Bonnie++?! I think we would get interesting results too
:)
something like
bonnie -u $USER -s 2048 -n 40:100k -d /path/to/mounted/test/

i think we would get interesting results!

And i think you got interesting results there!!! If 'we' have it working on
SMP it would be more interesting :)

Bruno

> 
> The main shortcoming: slow fsync. fsync on spadfs generally has to flush 
> all metadata buffers (it could be improved at least for case when file 
> size does not change --- for databases).
> 
> Mikulas
> 
> >		Linus
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br 

  parent reply	other threads:[~2006-11-05 14:49 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 21:52 New filesystem for Linux Mikulas Patocka
2006-11-02 22:32 ` Gabriel C
2006-11-03  1:22   ` Mikulas Patocka
2006-11-03  1:41     ` Andrew Morton
2006-11-03 17:14       ` Oleg Verych
2006-11-03 17:09         ` Mikulas Patocka
2006-11-03 17:36           ` Oleg Verych
2006-11-03 18:14             ` Mikulas Patocka
2006-11-03 19:08             ` Adrian Bunk
2006-11-03 19:32               ` Oleg Verych
2006-11-03 19:00         ` Alan Cox
2006-11-03 19:14           ` Andi Kleen
2006-11-03  2:09     ` Gabriel C
2006-11-03  8:26       ` Jan Engelhardt
2006-11-03 11:52         ` Mikulas Patocka
2006-11-03 11:59           ` Mikulas Patocka
2006-11-03 12:50             ` Jan Engelhardt
2006-11-03 18:48               ` Mikulas Patocka
2006-11-03 21:51                 ` Jan Engelhardt
2006-11-03 11:47       ` Mikulas Patocka
2006-11-02 22:53 ` Eric Dumazet
2006-11-03  1:28   ` Mikulas Patocka
2006-11-03  1:43     ` Andrew Morton
2006-11-04 18:40   ` Mikulas Patocka
2006-11-04 19:07     ` Eric Dumazet
2006-11-04 19:39     ` Tomasz Torcz
2006-11-05  1:58     ` Alan Cox
2006-11-05  2:09       ` Patrick McFarland
2006-11-05 13:03     ` Maurizio Lombardi
2006-11-05 20:16       ` H. Peter Anvin
2006-11-02 22:54 ` Grzegorz Kulewski
2006-11-02 23:10   ` Eric Dumazet
2006-11-02 23:19   ` Mikulas Patocka
2006-11-02 23:29     ` Grzegorz Kulewski
2006-11-03  1:34       ` Mikulas Patocka
2006-11-03 20:30         ` Christoph Lameter
2006-11-04 18:46           ` Mikulas Patocka
2006-11-05 12:02             ` Theodore Tso
2006-11-03 22:00         ` Oleg Verych
2006-11-03 22:42           ` Mikulas Patocka
2006-11-03  0:57     ` Nigel Cunningham
2006-11-03 13:05     ` Ric Wheeler
2006-11-06  2:42     ` Phillip Susi
2006-11-04 19:59   ` Albert Cahalan
2006-11-04 21:01     ` Jan-Benedict Glaw
2006-11-05 16:37       ` Albert Cahalan
2006-11-04 23:38     ` Mikulas Patocka
2006-11-04 23:46       ` Kyle Moffett
2006-11-05 20:26         ` H. Peter Anvin
2006-11-05 21:27           ` Rene Herman
2006-11-05 21:51             ` H. Peter Anvin
2006-11-06  0:36               ` Rene Herman
2006-11-05 21:49       ` Pavel Machek
2006-11-05  1:57     ` Alan Cox
2006-11-05 11:14       ` James Courtier-Dutton
2006-11-05 11:27         ` Brad Campbell
2006-11-05 12:37           ` Alan Cox
2006-11-06  2:48           ` Phillip Susi
2006-11-05 16:22         ` Albert Cahalan
2006-11-05 17:18       ` Mikulas Patocka
2006-11-05 18:14         ` Alan Cox
2006-11-05 18:18           ` Mikulas Patocka
2006-11-05 19:14             ` Alan Cox
2006-11-02 23:15 ` Linus Torvalds
2006-11-03 20:02   ` Paul E. McKenney
2006-11-02 23:41 ` Andi Kleen
2006-11-03  1:45   ` Mikulas Patocka
2006-11-03 13:47     ` Nikita Danilov
2006-11-03 14:39       ` Mikulas Patocka
2006-11-02 23:59 ` Jörn Engel
2006-11-03  1:19   ` Mikulas Patocka
2006-11-03 10:19     ` Jörn Engel
2006-11-03 11:56       ` Mikulas Patocka
2006-11-03 12:21         ` Jörn Engel
2006-11-03 13:31           ` Mikulas Patocka
2006-11-03 13:48             ` Jörn Engel
2006-11-03 14:19               ` Mikulas Patocka
2006-11-03 14:53                 ` Jörn Engel
2006-11-03 19:01                   ` Mikulas Patocka
2006-11-04 10:46                     ` Jörn Engel
2006-11-04 18:50                       ` Mikulas Patocka
2006-11-06 21:19                         ` Jörn Engel
2006-11-03 19:51             ` Adrian Bunk
2006-11-03 19:00     ` dean gaudet
2006-11-04 10:53       ` Jörn Engel
2006-11-04 11:13         ` dean gaudet
2006-11-04 20:07           ` Jörn Engel
2006-11-04 18:52       ` Mikulas Patocka
2006-11-04 18:56         ` Grzegorz Kulewski
2006-11-04 19:18           ` Mikulas Patocka
2006-11-04 17:37 ` Gautham R Shenoy
2006-11-04 18:27   ` Eric Dumazet
2006-11-05 22:33     ` Paul E. McKenney
2006-11-05  0:52 ` Linus Torvalds
2006-11-05  4:14   ` Mikulas Patocka
2006-11-05  8:34     ` Willy Tarreau
2006-11-05 11:31       ` Jan Engelhardt
2006-11-05 14:48     ` Bruno Cesar Ribas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-11-06 17:40 Al Boldi

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=20061105144857.GA7305@c3sl.ufpr.br \
    --to=ribas@c3sl.ufpr.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=torvalds@osdl.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