Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41362 - in /branches/SuSE-SLE-10-SP1-Branch/storage: package/yast2-storage.changes storage/src/include/auto_part_create.ycp storage/src/include/do_proposal_flexible.ycp
  • From: fehr@xxxxxxxxxxxxxxxx
  • Date: Thu, 11 Oct 2007 11:12:17 -0000
  • Message-id: <20071011111217.84C01351F9@xxxxxxxxxxxxxxxx>
Author: fehr
Date: Thu Oct 11 13:12:17 2007
New Revision: 41362

URL: http://svn.opensuse.org/viewcvs/yast?rev=41362&view=rev
Log:
fix performance hog with large number of disks and swap areas (#267262)

Modified:
    branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes
    branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/auto_part_create.ycp
    branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp

Modified: branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes?rev=41362&r1=41361&r2=41362&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes (original)
+++ branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes Thu Oct 11 13:12:17 2007
@@ -2,6 +2,7 @@
 Thu Oct 11 13:08:33 CEST 2007 - fehr@xxxxxxx
 
 - add support for online resize of ext3 (feature #301943)
+- fix performance hog with large number of disks and swap areas (#267262)
 
 -------------------------------------------------------------------
 Mon Oct  8 10:49:37 CEST 2007 - fehr@xxxxxxx

Modified: branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/auto_part_create.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/auto_part_create.ycp?rev=41362&r1=41361&r2=41362&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/auto_part_create.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/auto_part_create.ycp Thu Oct 11 13:12:17 2007
@@ -27,6 +27,7 @@
     y2milestone( "create_partitions disk:%1",
                  haskey(disk,"partitions")?remove(disk,"partitions"):disk );
     y2milestone( "create_partitions partitions %1", partitions );
+    flex_init_swapable( tgmap );
     boolean ret = false;
     boolean has_flex = has_flex_proposal();
     string vm = Storage::ProposalVM();

Modified: branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp?rev=41362&r1=41361&r2=41362&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp Thu Oct 11 13:12:17 2007
@@ -77,6 +77,32 @@
        }
     return( ret );
     };
+
+
+map swapable = $[];
+
+define void flex_init_swapable( map<string,map> tg )
+    ``{
+    swapable = $[];
+    foreach( string dev, map disk, tg,
+       ``{
+       list<map> sw = filter( map p, disk["partitions"]:[],
+                              ``(p["type"]:`unknown!=`extended &&
+                                 !p["delete"]:false &&
+                                 p["detected_fs"]:`unknown==`swap));
+       sw = filter( map p, sw, ``(Storage::CheckSwapable(p["device"]:"")));
+       foreach( map p, sw, 
+           ``{
+           swapable[p["device"]:""] = true;
+           });
+       });
+    y2milestone( "flex_init_swapable %1", swapable );
+    }
+
+define boolean check_swapable( string dev )
+    {
+    return( swapable[dev]:false );
+    }
   
 define string pinfo_name()
     ``{
@@ -2143,7 +2169,7 @@
                              ``(p["type"]:`unknown!=`free &&
                                 !p["delete"]:false &&
                                 p["detected_fs"]:`unknown==`swap));
-    swaps = filter( map p, swaps, ``(Storage::CheckSwapable(p["device"]:"")));
+    swaps = filter( map p, swaps, ``(check_swapable(p["device"]:"")));
     swaps = sort( map a, map b, swaps, ``(a["size_k"]:0>b["size_k"]:0));
     y2milestone( "can_swap_reuse swaps %1", swaps );
     if( swaps[0,"size_k"]:0 >= 128*1024 )
@@ -2179,7 +2205,7 @@
                              ``(p["type"]:`unknown!=`extended &&
                                 !p["delete"]:false &&
                                 p["detected_fs"]:`unknown==`swap));
-           sw = filter( map p, sw, ``(Storage::CheckSwapable(p["device"]:"")));
+           sw = filter( map p, sw, ``(check_swapable(p["device"]:"")));
            y2milestone( "can_swap_reuse disk %1 sw %2", dev, sw );
            swaps = (list<map>)union( swaps, sw );
            });
@@ -2622,6 +2648,7 @@
 map get_inst_proposal( map<string,map> target )
     {
     y2milestone( "get_inst_proposal start" );
+    flex_init_swapable( target );
     map ret = $[];
     target = Storage::AddWinInfo(target);
     ret["target"] = target;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages