login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
19
Re: A little coding style nugget of joy
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [author]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Andrew Lutomirski <luto@...>
To: Andi Kleen <andi@...>
Cc: <linux-kernel@...>, <kernel1@...>
Subject:
Re: A little coding style nugget of joy
Date: Wednesday, September 19, 2007 - 5:39 pm
On 9/19/07, Andi Kleen <andi@firstfloor.org> wrote:
quoted text
> > This is a terrible assumption in general (i.e. if filesize % blocksize > > is close to uniformly distributed). If you remove one byte and the data > > is stored with blocksize B, then you either save zero bytes with > > probability 1-1/B or you save B bytes with probability 1/B. The > > expected number of bytes saved is B*1/B=1. Since expectation is linear, > > if you remove x bytes, the expected number of bytes saved is x (even if > > there is more than one byte removed per file). > > You didn't calculate the probability of actually saving a full block > or not (that's the only thing that matters). I assumed it's relatively > small and can be ignored in practice since the amount of end white > space is negligible compared to total file size.
Sure I did. It's roughly 1/B per byte removed ( = 1/4096 ). --Andy -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [author]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
A little coding style nugget of joy
, Matt LaPlante
, (Wed Sep 19, 12:34 pm)
Re: A little coding style nugget of joy
, Pádraig Brady
, (Thu Sep 20, 5:20 am)
Re: A little coding style nugget of joy
, Robert P. J. Day
, (Thu Sep 20, 6:11 am)
Re: A little coding style nugget of joy
, Scott Preece
, (Thu Sep 20, 10:04 am)
Re: A little coding style nugget of joy
, Andi Kleen
, (Wed Sep 19, 1:13 pm)
Re: A little coding style nugget of joy
, Andy Lutomirski
, (Wed Sep 19, 5:22 pm)
Re: A little coding style nugget of joy
, Andi Kleen
, (Wed Sep 19, 5:30 pm)
Re: A little coding style nugget of joy
, Andrew Lutomirski
, (Wed Sep 19, 5:39 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Srivatsa Vaddagiri
Re: [PATCH, RFC] reimplement flush_workqueue()
Greg KH
[GIT PATCH] driver core patches against 2.6.24
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Rafael J. Wysocki
2.6.26-rc7-git2: Reported regressions from 2.6.25
linux-netdev
:
Alexey Dobriyan
Re: [GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Ilpo Järvinen
Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+
git
:
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
6 users
and
1047 guests
online.
Online users
zeekec
sreejithc
nystoc30
kernel Clark
johnLombard
fredaliv1961
Syndicate