Home | History | Annotate | Line # | Download | only in lfs
      1  1.10  christos #   $NetBSD: TODO,v 1.10 2005/12/11 12:25:26 christos Exp $
      2  1.10  christos 
      3  1.10  christos - Lock audit.  Need to check locking for multiprocessor case in particular.
      4  1.10  christos 
      5  1.10  christos - Get rid of lfs_segclean(); the kernel should clean a dirty segment IFF it
      6  1.10  christos   has passed two checkpoints containing zero live bytes.
      7   1.6  perseant 
      8   1.6  perseant - Now that our cache is basically all of physical memory, we need to make
      9   1.6  perseant   sure that segwrite is not starving other important things.  Need a way
     10   1.6  perseant   to prioritize which blocks are most important to write, and write only
     11   1.9  perseant   those, saving the rest for later.  Does this change our notion of what
     12   1.9  perseant   a checkpoint is?
     13   1.2       cgd 
     14   1.5  perseant - Investigate alternate inode locking strategy: Inode locks are useful
     15   1.5  perseant   for locking against simultaneous changes to inode size (balloc,
     16   1.5  perseant   truncate, write) but because the assignment of disk blocks is also
     17   1.5  perseant   covered by the segment lock, we don't really need to pay attention to
     18   1.5  perseant   the inode lock when writing a segment, right?  If this is true, the
     19   1.5  perseant   locking problem in lfs_{bmapv,markv} goes away and lfs_reserve can go,
     20   1.5  perseant   too.
     21   1.3  perseant 
     22   1.3  perseant - Get rid of DEV_BSIZE, pay attention to the media block size at mount time.
     23   1.3  perseant 
     24   1.3  perseant - More fs ops need to call lfs_imtime.  Which ones?  (Blackwell et al., 1995)
     25   1.3  perseant 
     26   1.3  perseant - lfs_vunref_head exists so that vnodes loaded solely for cleaning can
     27   1.3  perseant   be put back on the *head* of the vnode free list.  Make sure we
     28   1.3  perseant   actually do this, since we now take IN_CLEANING off during segment write.
     29   1.3  perseant 
     30   1.3  perseant - The cleaner could be enhanced to be controlled from other processes,
     31   1.3  perseant   and possibly perform additional tasks:
     32   1.3  perseant 
     33   1.3  perseant   - Backups.  At a minimum, turn the cleaner off and on to allow
     34   1.7  perseant     effective live backups.  More aggressively, the cleaner itself could
     35   1.7  perseant     be the backup agent, and dump_lfs would merely be a controller.
     36   1.3  perseant 
     37   1.3  perseant   - Cleaning time policies.  Be able to tweak the cleaner's thresholds
     38   1.7  perseant     to allow more thorough cleaning during policy-determined idle
     39   1.7  perseant     periods (regardless of actual idleness) or put off until later
     40   1.7  perseant     during short, intensive write periods.
     41   1.3  perseant 
     42   1.3  perseant   - File coalescing and placement.  During periods we expect to be idle,
     43   1.3  perseant     coalesce fragmented files into one place on disk for better read
     44   1.3  perseant     performance.  Ideally, move files that have not been accessed in a
     45   1.3  perseant     while to the extremes of the disk, thereby shortening seek times for
     46   1.3  perseant     files that are accessed more frequently (though how the cleaner
     47   1.3  perseant     should communicate "please put this near the beginning or end of the
     48   1.3  perseant     disk" to the kernel is a very good question; flags to lfs_markv?).
     49   1.3  perseant 
     50   1.3  perseant   - Versioning.  When it cleans a segment it could write data for files
     51   1.3  perseant     that were less than n versions old to tape or elsewhere.  Perhaps it
     52   1.3  perseant     could even write them back onto the disk, although that requires
     53   1.3  perseant     more thought (and kernel mods).
     54   1.3  perseant 
     55   1.3  perseant - Move lfs_countlocked() into vfs_bio.c, to replace count_locked_queue;
     56   1.3  perseant   perhaps keep the name, replace the function.  Could it count referenced
     57   1.3  perseant   vnodes as well, if it was in vfs_subr.c instead?
     58   1.3  perseant 
     59   1.3  perseant - Why not delete the lfs_bmapv call, just mark everything dirty that
     60   1.3  perseant   isn't deleted/truncated?  Get some numbers about what percentage of
     61   1.3  perseant   the stuff that the cleaner thinks might be live is live.  If it's
     62   1.3  perseant   high, get rid of lfs_bmapv.
     63   1.3  perseant 
     64   1.3  perseant - There is a nasty problem in that it may take *more* room to write the
     65   1.3  perseant   data to clean a segment than is returned by the new segment because of
     66   1.3  perseant   indirect blocks in segment 2 being dirtied by the data being copied
     67   1.3  perseant   into the log from segment 1.  The suggested solution at this point is
     68   1.3  perseant   to detect it when we have no space left on the filesystem, write the
     69   1.3  perseant   extra data into the last segment (leaving no clean ones), make it a
     70   1.3  perseant   checkpoint and shut down the file system for fixing by a utility
     71   1.3  perseant   reading the raw partition.  Argument is that this should never happen
     72   1.3  perseant   and is practically impossible to fix since the cleaner would have to
     73   1.3  perseant   theoretically build a model of the entire filesystem in memory to
     74   1.3  perseant   detect the condition occurring.  A file coalescing cleaner will help
     75   1.3  perseant   avoid the problem, and one that reads/writes from the raw disk could
     76   1.3  perseant   fix it.
     77   1.3  perseant 
     78   1.3  perseant - Need to keep vnode v_numoutput up to date for pending writes?
     79   1.3  perseant 
     80   1.3  perseant - If delete a file that's being executed, the version number isn't
     81   1.3  perseant   updated, and fsck_lfs has to figure this out; case is the same as if
     82   1.3  perseant   have an inode that no directory references, so the file should be
     83   1.3  perseant   reattached into lost+found.
     84   1.3  perseant 
     85   1.3  perseant - Currently there's no notion of write error checking.
     86   1.3  perseant   + Failed data/inode writes should be rescheduled (kernel level bad blocking).
     87   1.3  perseant   + Failed superblock writes should cause selection of new superblock
     88   1.3  perseant   for checkpointing.
     89   1.3  perseant 
     90   1.3  perseant - Future fantasies:
     91   1.3  perseant   - unrm, versioning
     92   1.3  perseant   - transactions
     93   1.3  perseant   - extended cleaner policies (hot/cold data, data placement)
     94   1.3  perseant 
     95   1.3  perseant - Problem with the concept of multiple buffer headers referencing the segment:
     96   1.3  perseant   Positives:
     97   1.3  perseant     Don't lock down 1 segment per file system of physical memory.
     98   1.3  perseant     Don't copy from buffers to segment memory.
     99   1.3  perseant     Don't tie down the bus to transfer 1M.
    100   1.3  perseant     Works on controllers supporting less than large transfers.
    101   1.3  perseant     Disk can start writing immediately instead of waiting 1/2 rotation
    102   1.3  perseant         and the full transfer.
    103   1.3  perseant   Negatives:
    104   1.3  perseant     Have to do segment write then segment summary write, since the latter
    105   1.3  perseant     is what verifies that the segment is okay.  (Is there another way
    106   1.3  perseant     to do this?)
    107   1.1   mycroft 
    108   1.3  perseant - The algorithm for selecting the disk addresses of the super-blocks
    109   1.3  perseant   has to be available to the user program which checks the file system.
    110