About bdflush(update) & kernel 2.0

About bdflush(update) & kernel 2.0

Post by Henry Shi » Wed, 19 Jun 1996 04:00:00



Hello, everybody:

   I've read the Documentation/Changes from the kernel 2.0.0,
and it says that:

Bdflush
=======

   Bdflush has also been integrated into the new kernels, so those of
you using it on older systems no longer need to hunt for the patches to
implement it once you upgrade to 1.3.x.

My question is: Does it mean that I don't need /bin/bdflush anymore?
Can I remove the line "/bin/update &" from the boot script /etc/rc.d/rc.S?
Since I'm using kernel 2.0.0 now......

                                        Henry Shieh

 
 
 

About bdflush(update) & kernel 2.0

Post by Thomas Quin » Thu, 20 Jun 1996 04:00:00



Quote:> My question is: Does it mean that I don't need /bin/bdflush anymore?

No.

Quote:> Can I remove the line "/bin/update &" from the boot script /etc/rc.d/rc.S?

No. update is still required.

--


 
 
 

About bdflush(update) & kernel 2.0

Post by David F » Sat, 22 Jun 1996 04:00:00



]
] > My question is: Does it mean that I don't need /bin/bdflush anymore?
]
] No.
]
] > Can I remove the line "/bin/update &" from the boot script /etc/rc.d/rc.S?
]
] No. update is still required.

Then what does the language "integrated into the kernel" mean?  I see
a similar statement about kerneld in the Documentation directory.
--
David Fox           http://found.cs.nyu.edu/fox            xoF divaD

 
 
 

About bdflush(update) & kernel 2.0

Post by Thomas Quin » Sun, 23 Jun 1996 04:00:00



Quote:> ] No. update is still required.
> Then what does the language "integrated into the kernel" mean?  I see

update and bdflush are two distinct processes. The update program
used to implement both in the same user-land binary. Now the bdflush
process runs as a kernel thread (kflushd), but the user-land update is
still required. The change is transparent to the user (i.e. you still
have to launch the same update binary as before.)

Further enlightenment can be found in fs/buffer.c.

--

 
 
 

About bdflush(update) & kernel 2.0

Post by Gabor J.To » Tue, 25 Jun 1996 04:00:00




> update and bdflush are two distinct processes.  [...]  Further
> enlightenment can be found in fs/buffer.c.

I'm sorry, I  haven't found it;).  What is  the difference between update
and bdflush?

-,- - - -,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 
 
 

About bdflush(update) & kernel 2.0

Post by Thomas Quin » Fri, 28 Jun 1996 04:00:00



Quote:> I'm sorry, I  haven't found it;).  What is  the difference between update
> and bdflush?

update does a sync(2) every 30 seconds. bdflush implements a more clever
way of comitting a limited number of dirty buffers to disk. From buffer.c :

/* ====================== bdflush support =================== */

/* This is a simple kernel daemon, whose job it is to provide a dynamic
 * response to dirty buffers.  Once this process is activated, we write back
 * a limited number of buffers to the disks and then go back to sleep again.
 */

Is there a buffer-cache guru in the room who could give a more precise
explanation ?

--

 
 
 

About bdflush(update) & kernel 2.0

Post by Studnitzky Boa » Wed, 03 Jul 1996 04:00:00



: > I'm sorry, I  haven't found it;).  What is  the difference between update
: > and bdflush?

: update does a sync(2) every 30 seconds. bdflush implements a more clever
: way of comitting a limited number of dirty buffers to disk. From buffer.c :

: ...

After noticing that bdflush is a kernel process, i killed my update.
this worked great for a long time...
yesterday, i had a cold boot in the middle of my work, all the files
i made in the 15 minutes prior to the reset were gone. no sign of them.
is this because i don't run update?

Boaz.

 
 
 

About bdflush(update) & kernel 2.0

Post by Gabor J.To » Thu, 04 Jul 1996 04:00:00




Quote:> After noticing that bdflush is a kernel process, i killed my update.
> this worked great for a long time...  yesterday, i had a cold boot
> in the middle of my work, all the files i made in the 15 minutes
> prior to the reset were gone. no sign of them.  is this because i
> don't run update?

Now that I've figured  this out (I think)   let me share.  There  are two
daemons: bdflush and kflushd.  kflushd takes  care that pages are flushed
out when the  kernel  needs  the  space, bdflush takes  care  that  dirty
buffers are eventually flushed even if the kernel doesn't need the space.
Obviously, if kflushd isn't running the system may  run out of memory, so
it needs to run no matter what.  In normal operation bdflush isn't really
necessary as shutdown will take care  of syncing before the kernel stops,
however, it minimizes  the loss should  the system be stopped abnormally.
I could imagine situation  where you might   want to disable bdflush  (to
avoid the   disk  spinning up in   a  portable running on   battery,  for
example), although bdflush seems to have plenty of  parameters so you can
probably set it to suit your needs and still keep things safe.

Now the story   of  update.  In older  kernels   (without kernel threads)
update used to start both kflushd and  bdflush (the names might have been
different, I'm not sure).  That's  why pretty much  all init scripts used
to fire up update as soon as possible.  It  then forked twice, one of the
children became kflushd and the other  bdflush.  In newer kernels kflushd
is started  as a kernel   thread almost immediately  after init  (it is I
believe process #3), much before update.   Then comes update, forks, make
the system call that used to start kflushd.  This call that used never to
return  now returns immediately  causing this child  to exit immediately.
Then update forks again and starts bdflush as it always did.

The bottom  line is, you still need  update if you want  to remain on the
safe side.   You could make  it marginally more efficient  by eliminating
the unnecessary  fork and syscall  but you wouldn't gain  much  and got a
program that would no longer be good for older kernels.

I  hope all of the above  is  correct; if not, feel   free to correct me.
Apologies  to those who have been   following the 1.3 development process
and are probably tired of all this but people who  are switching from 1.2
to 2.0 are probably not and it may help them.

Regards.

-,- - - -,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 
 
 

About bdflush(update) & kernel 2.0

Post by Thomas Quin » Sat, 06 Jul 1996 04:00:00



Quote:> yesterday, i had a cold boot in the middle of my work, all the files
> i made in the 15 minutes prior to the reset were gone. no sign of them.
> is this because i don't run update?

Probably so.

--

 
 
 

About bdflush(update) & kernel 2.0

Post by Thomas Quin » Sat, 06 Jul 1996 04:00:00



Quote:> I  hope all of the above  is  correct; if not, feel   free to correct me.

What you wrote is correct, except for the fact that what you call 'bdflush'
is actually 'update'. 'bdflush' is what 'kflushd' was called before being
implemented as a kernel thread.

--

 
 
 

1. bdflush&update/kflushd&kerneld

Does anyone know if kflushd and kerneld replace bdflush and update?  I upgraded
my system and I am using kerneld and kflushd so I was wondering if I still have
to start update in /etc/rc.d/rc.S.

--
Matt...
______________________________________________________________________________
Matthew Stainforth          
Information Systems Analyst           require "disclaim.pl";      
NBCC - Moncton Campus          &Disclaim($opinions)||die "drop dead $!";
Phone: (506) 856-2249            

______________________________________________________________________________

2. Configuring Veritas Volumes

3. how to change the bdflush(update) 's update time

4. Linux install these days?

5. How to customise my Kernel & the steps please ( not updating the kernel )???

6. Possible 2.3.99pre6 problem

7. Updated DMA-mode IDE drivers for kernel 2.0.x?

8. TRACERT from Linux box?

9. HELP: RED HAT 3.0.3 + kernel 2.0 update + PPP (NOT WORKING!)

10. running programs is really slow since update to 2.0.xx kernel..

11. 2.0.35 + update/bdflush (major) problem.

12. update (bdflush) not running

13. update, bdflush